Code: Select all
bool CIrrlicht::CreateIrrlichtDeviceEx(video::E_DRIVER_TYPE Type /* = E_DRIVER_TYPE::EDT_DIRECT3D9 */,HWND windowHandle,int width, int height)
{
ZeroMemory(&this->creationParams,sizeof(SIrrlichtCreationParameters));
creationParams.WindowId = reinterpret_cast<void*>(windowHandle);
creationParams.DriverType = Type;
//creationParams.WindowSize = core::dimension2d<s32>(width, height);
-> g_pDevice = createDeviceEx(creationParams);
if(g_pDevice)
{
MessageBoxA(NULL,"Device Created","OK",MB_OK);
return true;
}
}
I followed the tutorial but added my own classes and for some reason, the device wont create and it gives an access violation.