...
ui2dimg = driver -> getTexture(texturefile.c_str());
...
while(device -> run() && driver)
{
...
if (gset->isUI)
driver -> draw2DImage(ui2dimg, position2d<int>(0, 0));
...
}
b4 into game,i use
device->getVideoDriver()->removeTexture(ui2dimg);
but scene always show 2dui & menu.
how to clear out all 2d texture & menu gui?
how to clear out all 2d gui&menu into 3d game?
-
- Competition winner
- Posts: 189
- Joined: Tue Oct 16, 2007 3:53 am
- Location: Indonesia
- Contact:
-
- Competition winner
- Posts: 189
- Joined: Tue Oct 16, 2007 3:53 am
- Location: Indonesia
- Contact:
If you don't want to draw ui2dimg, you need to avoid calling driver->draw2DImage(ui2dimg, ...). The easy way would be to write something like this...
Instead of removing the texture from the texture cache, you would write this...
Even easier would be to use an IImage.
Travis
Code: Select all
if (ui2dimg)
driver->draw2DImage(ui2dimg, position2di(0, 0));
Code: Select all
//device->getVideoDriver()->removeTexture();
ui2dimg = 0;
Travis