• Advertisement
Sign in to follow this  

Direct3D 9.0c Setup Problem

This topic is 4798 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been doing a LOT of debugging and I know it's this function that's not working, wtf am I doing wrong?
	if (!g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &g_pd3dDevice))
	{

		return 3;

	}


I *know* it's this function, so please don't tell me about anything other than this code or setting up the present parameters.

Share this post


Link to post
Share on other sites
Advertisement
Here's how I set the D3DPRESENT_PARAMETERS


if (FAILED(g_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm)))
{

return 2;

}

ZeroMemory(&d3dpp, sizeof(d3dpp));

d3dpp.AutoDepthStencilFormat = D3DFMT_UNKNOWN;
d3dpp.BackBufferCount = 1;
d3dpp.BackBufferFormat = d3ddm.Format;
d3dpp.EnableAutoDepthStencil = FALSE;
d3dpp.hDeviceWindow = hWnd;
d3dpp.Flags = 0;
d3dpp.MultiSampleQuality = 0;
d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;

if (bWindowed == TRUE)
{

d3dpp.Windowed = TRUE;

}
else
{

d3dpp.BackBufferWidth = 640;
d3dpp.BackBufferHeight = 480;
d3dpp.Windowed = FALSE;

}



And btw the problem is not compilation, but I have error checking on and it closes when this error goes off (the debugging I'm doing is telling me it's this function, and I KNOW it is that function).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement