D3DDEVTYPE_HAL causing problems
For some reason when calling CreateDevice(), D3DDEVTYPE_HAL is causing the initialization to fail. D3DDEVTYPE_REF works.. how ever I'm working off my gaming comp that has a geforce 8800 gts, so there is no reason that D3DDEVTYPE_HAL should be causing the call to fail. Does anyone have any ideas what could be causing the problem?
heres my code, I'll post debug info when I wake up in the morning (im really tired)
this->width = width;this->height = height;this->winHandle = hwnd;this->winInstance = hInstance;this->windowed = windowed;this->direct3D9 = Direct3DCreate9(D3D_SDK_VERSION);ZeroMemory(&this->engineParameters, sizeof(D3DPRESENT_PARAMETERS));this->engineParameters.BackBufferCount = 1;this->engineParameters.Windowed = FALSE;this->engineParameters.SwapEffect = D3DSWAPEFFECT_DISCARD;this->engineParameters.hDeviceWindow = this->winHandle;this->engineParameters.BackBufferFormat = D3DFMT_X8R8G8B8;this->engineParameters.BackBufferWidth = this->width;this->engineParameters.BackBufferHeight = this->height;this->engineParameters.EnableAutoDepthStencil = TRUE;this->engineParameters.AutoDepthStencilFormat = D3DFMT_D16_LOCKABLE;//creating devicethis->direct3D9->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &this->engineParameters, &this->device);
The Problem is properly D3DFMT_D16_LOCKABLE. This depth stencil format isn’t supported on all graphics adapters.
You are probably using some combination of parameters that you GPU doesn't support. D3DDEVTYPE_REF is microsofts software reference driver, so it supports everything, and is pretty much garanteed to not fail on initialization.
My best bet would be that your card doesn't support D3DFMT_D16_LOCKABLE for AutoDepthStencilFormat. Try changing it to D3DFMT_D16 and see if it still fails.
My best bet would be that your card doesn't support D3DFMT_D16_LOCKABLE for AutoDepthStencilFormat. Try changing it to D3DFMT_D16 and see if it still fails.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement