I am still relatively new to Irrlicht and need some help working with materials. I created a custom scene node, and I have been successful in getting the scene node to display a loaded 3DS mesh. Now I want to add texture to the mesh, and following the examples I need to do something like this
Code: Select all
this->setMaterialTexture(0, SceneManager->getVideoDriver()->getTexture("data\\Planetgas0-cl.bmp"));
// set diffuse texture
this->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting
this->getMaterial(0).Shininess = 20.0f;
Code: Select all
First-chance exception at 0x00409e99 in GameEngine.exe: 0xC0000005: Access violation writing location 0x00000014.
Unhandled exception at 0x00409e99 in GameEngine.exe: 0xC0000005: Access violation writing location 0x00000014.
Could someone please give me some direction?