little help trying to render to a typical Win32 window.
Posted: Wed Feb 11, 2009 1:10 am
Hello, i'm trying to render to a pre_made window and for some reason I get an access violation right here:
it returns 0x00000 and i did make sure to initialize it correctly, any advice?
I followed the tutorial but added my own classes and for some reason, the device wont create and it gives an access violation.
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.