I'm using a recent trunk version of Irrlicht (Direct3D 9 driver) with the cubemap support. In my case the display window can be closed and reopened by the application, so the irrlicht device can be opened/closed multiple times. If I'm using cubemaps, a strange memory leak appears. I create the cubemap the following way:
Code: Select all
irr::video::IImage* cubeImages[6];
cubeImages[0] = driver->createImageFromFile("cube/pos-x.png");
cubeImages[1] = driver->createImageFromFile("cube/neg-x.png"),
cubeImages[2] = driver->createImageFromFile("cube/pos-y.png"),
cubeImages[3] = driver->createImageFromFile("cube/neg-y.png"),
cubeImages[4] = driver->createImageFromFile("cube/neg-z.png"),
cubeImages[5] = driver->createImageFromFile("cube/pos-z.png");
cubemapTexture = driver->addTextureCubemap("environmentMap", cubeImages[0], cubeImages[1], cubeImages[2], cubeImages[3], cubeImages[4], cubeImages[5]);
for (int i = 0; i < 6; i++)
cubeImages[i]->drop();
Code: Select all
node->setMaterialTexture(4, cubemapTexture);