Code: Select all
scene::ISceneNode* node = scenemgr->addCubeSceneNode(10.0);
if(node) {
node->setPosition(core::vector3df(0.f, 0.f, 0.f));
node->setMaterialFlag(video::EMF_LIGHTING, false);
node->setMaterialTexture(0, driver->getTexture("data/textures/terrain/test.png"));
}
http://www.imagebanana.com/view/o4ykqpm8/1.jpg
so everything fine on this. But if I activate the rendering of the cube's bounding box, I end up with this:
http://www.imagebanana.com/view/55kkjt47/2.jpg
In addition to that, every other mesh with the same texture as "node" will be rendered black. I actually ran into this issue when I tried to implement an own Terrain-class. At that time I was rendering the terrain and 2 spheres above it. Everything went fine until i assigned a texture to the terrain - suddenly it was rendered all black. I couldn't find the real cause of this issue - it seems to happen if untextured primitives overlapp textured primitves, but it's also texturefile-dependent somehow. If I change the texture to a black and white .png with the same fileattributes, the error disappears.
Btw, I am using Irrlicht Version 1.7.3 on Windows 7 with mingw-gcc and the OpenGL renderer 3.3.11554 with an AMD Radeon HD 4870.
Anyone got an idea what's going wrong?