Creating or Destroying an Image

// Access the cluster's resource manager:
RED::Object* resmgr = RED::Factory::CreateInstance( CID_REDResourceManager );
RED::IResourceManager* iresmgr = resmgr->As< RED::IResourceManager >();
const RED::State& state = iresmgr->BeginState();

// Create an image (2D in this case, there's one creation method for each type of image):
RED::Object* image;
RC_TEST( iresmgr->CreateImage2D( image, state ) );

// Delete the image after use:
RC_TEST( iresmgr->DeleteImage( image, state ) );

The destruction of an image is a synchronous task. It should occur from the rendering thread of the application, and it’s the responsibility of the application to ensure that the image is not used anymore in any shader of HOOPS Luminate.