Setting a background image

You may set up to two different images as background: one cube image and one optional 2D image. If only the cube image is provided, it's used for every rendering need (direct or indirect viewing). If an optional 2D image is provided, it overrides the cube image for direct visualization only.

RED::Object* image_cube = NULL;
RED::Object* image_2d = NULL;

// Get the default VRL of the window (win is a pointer to an existing REDsdk window).
RED::IWindow* iwin = win->As< RED::IWindow >();

RED::Object* vrl;
RC_TEST( iwin->GetDefaultVRL( vrl ) );

// Set the VRL background(s).
RED::IViewpointRenderList* ivrl = vrl->As< RED::IViewpointRenderList >();
RC_TEST( ivrl->SetBackgroundImages(	image_cube, RED::Matrix::IDENTITY, 
                                    image_2d, RED::Matrix::IDENTITY, 
                                    true, iresmgr->GetState() ) );