IGUIStaticText elements disappear with textures > 2
Posted: Tue Aug 08, 2006 3:48 am
It seems that static text elements dissappear when you assign more than two textures to a scene node. Any scene node, and all text elements. I assume this spreads to other GUI elements as well, but I haven't tested it. I also have no idea why this happens.
It may be specific to the opengl renderer.
Below is the code that replicates it every time:
Of course, make sure there are all of the textures (any kind) when you run it.
I am using a modified Irrlicht, but the only modification relates to setting pixel shader constants (letting GLSL use more than one sampler). I haven't tested or seen this in linux, just windows.
Maybe something is wrong with my code, but I'm almost certain it's a bug.
agrif
It may be specific to the opengl renderer.
Below is the code that replicates it every time:
Code: Select all
#include "irrlicht.h"
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
IrrlichtDevice* device = createDevice(EDT_OPENGL, dimension2d<s32>(640, 480), 32, false, false, false, 0);
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
ISceneNode* node = smgr->addSphereSceneNode(30);
node->setMaterialTexture(0, driver->getTexture("tex1.bmp"));
node->setMaterialTexture(1, driver->getTexture("tex2.bmp"));
node->setMaterialTexture(2, driver->getTexture("tex3.bmp")); // these two lines can be excluded, and the text appears
node->setMaterialTexture(3, driver->getTexture("tex4.bmp"));
IGUIStaticText* text = guienv->addStaticText(L"I'm Not Here!", rect<int>(10,10,200,22), true);
while (device->run())
{
driver->beginScene(true, true, SColor(0,200,200,200));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
I am using a modified Irrlicht, but the only modification relates to setting pixel shader constants (letting GLSL use more than one sampler). I haven't tested or seen this in linux, just windows.
Maybe something is wrong with my code, but I'm almost certain it's a bug.
agrif