I tried a straight-forward approach and it just rendered the background color. Then I looked through the Irrlicht source and realized I hadn't added the camera to my custom rendering loop. So I copied that in (along with anything else that seemed relevant), but I still just get the background color.
So how would I go about specifying the render order of my objects? I'd really prefer not to use actual z-differences to get the effect, and it seems like a simple thing to ask. I know in straight OpenGL or DirectX it would be really straight-forward.
My original loop (ripped pretty much straight from the examples) was:
Code: Select all
driver->beginScene(true, true, video::SColor(255,128,0,0));
smgr->drawAll();
env->drawAll();
driver->endScene();
Code: Select all
driver->beginScene(true, true, video::SColor(255,128,0,0));
if ( driver )
{
core::matrix4 identity;
driver->setTransform ( video::ETS_PROJECTION, identity );
driver->setTransform ( video::ETS_VIEW, identity );
driver->setTransform ( video::ETS_WORLD, identity );
driver->setTransform ( video::ETS_TEXTURE_0, identity );
driver->setTransform ( video::ETS_TEXTURE_1, identity );
driver->setTransform ( video::ETS_TEXTURE_2, identity );
driver->setTransform ( video::ETS_TEXTURE_3, identity );
}
smgr->getActiveCamera()->OnRegisterSceneNode();
smgr->getActiveCamera()->render();
controller->GetTarget()->GetSection()->Render();
env->drawAll();
driver->endScene();