Note that some textures, like the skybox and leaves, do appear correctly. Anyway, below is what it's supposed to look like. I got this by adding on-screen text (near the middle-left of the screen).
As a cheap workaround I tried placing the text off-screen. This didn't fool Irrlicht; it still de-textured the scene. I also tried putting the text partially off-screen. If only the text box is peeking into the screen but not the lettering, it still de-textures the scene. If there are any letters on-screen, though, the scene renders fine.
Also, it seems like the first frame renders correctly whether or not I have on-screen text. It's every subsequent frame that gets messed up without the text.
Can anybody guess as to what's going on, or suggest sanity-checks I could try that'd yield more info?
For reference, my render loop looks like this:
Code: Select all
gui::IGUIStaticText* onScreenText = device_->getGUIEnvironment()->addStaticText( L"Press 'W' to change wireframe mode", core::rect<s32>(-10,465,200,475), true);
onScreenText->setOverrideColor(video::SColor(100,255,255,255));
driver->setViewPort(core::rect<s32>(0,0,(s32)WINDOW_XRES, (s32)WINDOW_YRES));
// the run loop
while( device_->run() ){ // while the window is open
// begin scene with a color and depth buffer.
driver->beginScene(true, true, SColor(0,200,200,200));
smgr->setActiveCamera(&robot_->getMonoCamera());
smgr->drawAll();
device_->getGUIEnvironment()->drawAll();
// display frames per second in window title
int fps = device_->getVideoDriver()->getFPS();
if (lastFps != fps)
{
std::wostringstream oss;
oss<<L"Irrlicht LAGR demo ["<<device_->getVideoDriver()->getName()<<L"] FPS: "<<fps;
device_->setWindowCaption(oss.str().c_str());
lastFps = fps;
}
device_->getVideoDriver()->endScene();
}
Code: Select all
device_->getGUIEnvironment()->drawAll();
Thanks,
-- Matt