Hello! In R23 we got an interesting feature to play with, but there is not much of an info about how to use it properly. Im talking about BaseDraw::GetViewportImage().
This is what i tried.
AutoAlloc<BaseBitmap> bmp;
maxon::ImageRef imgr = maxon::ImageClasses::IMAGE().Create() iferr_return;
const maxon::PixelFormat rgbFormat = maxon::PixelFormats::RGB::U8();
const auto storageType = maxon::ImagePixelStorageClasses::Normal();
imgr.Init(optW, optH, storageType, rgbFormat) iferr_return;
bmp->Init(optW, optH);
bmp->GetImageRef(SAVEBIT::NONE, true, imgr);
doc->GetActiveBaseDraw()->GetViewportImage(imgr);
ShowBitmap(bmp);
Bitmap is just black, which leads me to conclusion that im using it the wrong way.
How to use this new function properly and save to bitmap?