Direct3D CreateDevice
This is a discussion on Direct3D CreateDevice within the Game Programming forums, part of the General Programming Boards category; Code:
pDirect3D=Direct3DCreate9(D3D_SDK_VERSION);
if(pDirect3D==NULL)
{
goto EXIT;
}
D3DPRESENT_PARAMETERS D3DPresentParams;
ZeroMemory(&D3DPresentParams, sizeof(D3DPRESENT_PARAMETERS));
D3DPresentParams.Windowed=false;
D3DPresentParams.BackBufferCount=1;
D3DPresentParams.BackBufferWidth=800;
D3DPresentParams.BackBufferHeight=600;
D3DPresentParams.BackBufferFormat=D3DFMT_X8R8G8B8;
D3DPresentParams.SwapEffect=D3DSWAPEFFECT_DISCARD;
D3DPresentParams.hDeviceWindow=hWnd;
HRESULT hResult ...