Skip to main content
gamedev.net
🔒 Locked

Re: Init Direct3d error

Started by LagunaCloud Dec 20, 2005 at 12:54 PM 2 replies 1.4k views
Original Post
LagunaCloud
LagunaCloud
I've got a strange error, when I was using visual studio 6.0 I had no problems when I got visual studio.net, my computer was crashing when I tried to run my program without debugging, then when I went into debug mode, it ran fine, so I placed a bunch of messageboxes all over the place telling me what succeeds and doesn't and my init direct 3d is failing, why?

BOOL cls_GFX::InitD3D(void)
{
	if((id3d8 = Direct3DCreate8(D3D_SDK_VERSION)) == NULL)
	{//if could not create the direct3D8 interface then
		return FALSE;			//Return false
	}
	return TRUE;
}


Laguna!!!
DrunkenHyena
DrunkenHyena
When things work in Debug but not Release it typically means uninitialized variables. I don't see why that should fail unless your computer is messed up. Try running the D3D tests in DxDiag.exe. If they work, then your computer should be fine.

I'd guess the problem is actually somewhere else.
Stay Casual,KenDrunken Hyena</FON
Illco
Illco
From the SDK documentation:
Quote:

If this function fails, it indicates that the header file version does not match the runtime DLL version. See GetDXVer Sample for help checking the version of the runtime that is installed on your machine.


Are you perhaps compiling against DX 9.0?

Illco
LagunaCloud
LagunaCloud
Perhaps... I don't know where it would be doing that, but in all my initialization I use the directX 8 calls.
Laguna!!!

Topic Locked

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

Sign in to reply to this topic.