Creating and accessing an auxiliary VRL's render image

// Assuming that 'window' is a valid REDsdk window object:
RED::IWindow* iwindow = window->As< RED::IWindow >();

// Creating an auxiliary VRL that render to a HD half float buffer:
RED::Object* auxvrl;
RC_TEST( iwindow->CreateVRL( auxvrl, 1920, 1080, RED::FMT_HALF_FLOAT_RGBA, true, iresmgr->GetState() ) );

// Retrieve the VRL interface:
RED::IViewpointRenderList* iauxvrl = auxvrl->As< RED::IViewpointRenderList >();

// Add data to visualize.

// Render the window:
RC_TEST( iwindow->FrameDrawing() );

// Access the built-in VRL image:
RED::Object* image = iauxvrl->GetRenderImage();
RED::IImage2D* iimage2D = image->As< RED::IImage2D >();

// For instance, read-back the VRL pixels to CPU:
RC_TEST( iimage2D->GetPixels() );

A viewpoint render list (VRL) is either corresponding to an off-screen buffer if it's an auxiliary VRL or to an on-screen buffer if it's the default VRL of a window. A VRL has two built-in render images that provide an access to its contents:

These methods return ready-to-use, GPU uploaded, 2D images, using the RED::TGT_TEX_RECT target. Note that the application may also specify other images for accessing a VRLs contents, using RED::IImage2D::SetRenderImage or RED::IImage2D::SetRenderDepthImage.