Computing a View-Dependent 360° GI Cache

Here is how you can build a view-dependent 360° GI cache suitable to render panoramas:

// "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_SPHERICAL, nofilter, noexclude, noblock ) );
}