Here is my resize code:
Code: Select all
void resize(int width, int height)
{
irr::SIrrlichtCreationParameters params;
params.DeviceType = irr::EIDT_WIN32;
params.DriverType = irr::video::EDT_OPENGL;
params.WindowId = windowHandle_;
irr::core::dimension2d<irr::u32> windowSize(width, height);
params.WindowSize = windowSize;
device_ = irr::createDeviceEx(params);
device_->setResizable(true);
sceneManager_ = device_->getSceneManager();
orthoCam_ = sceneManager_->addCameraSceneNode(0, irr::core::vector3df(0, 0, 400-130-96), irr::core::vector3df(0, 1, 0));
irr::core::matrix4 projMat;
projMat.buildProjectionMatrixOrthoLH(width, height, 0.1, 10000.0);
orthoCam_->setProjectionMatrix(projMat, true);
device_->getGUIEnvironment()->addStaticText(L"Hello World!", irr::core::rect<irr::s32>(10, 10, 260, 22), true, true, 0, -1, true);
irr::scene::IAnimatedMesh* mesh = sceneManager_->getMesh("media/cube.obj");
irr::scene::IAnimatedMeshSceneNode* node = sceneManager_->addAnimatedMeshSceneNode(mesh);
if (node)
{
node->setMaterialFlag(irr::video::EMF_LIGHTING, false);
node->setMaterialTexture(0, device_->getVideoDriver()->getTexture("media/metal_brosse.jpg"));
}
}
Oh and the crash happens in atiumdag.dll.
Thanks for any help.