Computing a View-Dependent GI Cache

Here is how you can build a view-dependent GI cache:

// "win" is a pointer to a RED window.
// "viewpoint" is a pointer to a scene viewpoint.
RED::IWindow* iwin = win->As< RED::IWindow >();

// Publish the latest data modifications.
RC_TEST( iresmgr->EndState() );

// Render the world GI cache.
RED::Object* gi_cache;
RED::Vector< RED::Vector3 > nofilter;
RED::Vector< RED::Object* > noexclude, noblock;
bool complete = false;

while( !complete )
{
    RC_TEST( iwin->FrameTracingGICache( complete, gi_cache, viewpoint, RED::GICM_CAMERA_VIEW, nofilter, noexclude, noblock ) );
}