Skip to main content
GameDev.net gamedev.net
🔒 Locked

Direct3D 9.0c Setup Problem

Started by dist0rted Jan 3, 2005 at 10:57 PM 2 replies 350+ views
Original Post
dist0rted
dist0rted
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.
=============================All knowledge is good; only the way it is put to use is good or evil.
dist0rted
dist0rted
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).
=============================All knowledge is good; only the way it is put to use is good or evil.
dist0rted
dist0rted
Problem has been solved.
=============================All knowledge is good; only the way it is put to use is good or evil.
caesar4
caesar4
look into the header
ITS GREAT for debugging
Cartman's definition of sexual harrasement:"When you are trying to have intercourse with a lady friend, and some other guy comes up and tickles your balls from behind"(watch South Park, it rocks)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.