I found a post that dated back to 2005 that said if an image was loaded prior to loading a level, then the image would just stay as the level is loaded. I'm trying to do that but the screen is just black. Any ideas?
Code to draw a piximap:
// Draw a piximap
void Time::DrawPixi(string image)
imagex = "/lib/std/" + image;
const char* pixi = imagex.c_str ( );
// Load HUD piximap
iTextureManager* txtmgr = g3d->GetTextureManager ();
csRef<iDataBuffer> buf = VFS->ReadFile (pixi);
csRef<iImage> ifile = imgldr->Load (buf, txtmgr->GetTextureFormat ());
csRef<iTextureHandle> txt =
txtmgr->RegisterTexture (ifile, CS_TEXTURE_2D);
csSimplePixmap* pixmap = new csSimplePixmap (txt);
pixmap->DrawScaled (g3d, 10, 10, 300, 300);
Code to load the map:
// Load the level file which is called 'world'.
if (!loader->LoadMapFile ("world"))
ReportError("Error couldn't load level!");
csTextProgressMeter* meter = new csTextProgressMeter (system_console);
The PixiMap function works fine outside of trying to get it to show an image before/during a level load.