Code: Select all
//starting engine
irr::SIrrlichtCreationParameters param;
param.DriverType = video::EDT_DIRECT3D9;
param.WindowId = reinterpret_cast<s32>( Win1 );
irr::IrrlichtDevice* device = irr::createDeviceEx( param);
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
scene::ICameraSceneNode* cam =smgr->addCameraSceneNode();
cam->setTarget(core::vector3df(0,0,0));
smgr->addSkyBoxSceneNode(
driver->getTexture("../../media/irrlicht2_up.jpg"),
driver->getTexture("../../media/irrlicht2_dn.jpg"),
driver->getTexture("../../media/irrlicht2_lf.jpg"),
driver->getTexture("../../media/irrlicht2_rt.jpg"),
driver->getTexture("../../media/irrlicht2_ft.jpg"),
driver->getTexture("../../media/irrlicht2_bk.jpg"));
while(device->run() && continue_render)
{
driver->beginScene(true, true, 0);
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
but if i compile the code above and run the programm i get this error (hopefully correct translated):
Unhandled exception at: c100688ea in GMF-Edit.exe: 0xC0000005: access violation while writing on position 0x00000000