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

D3D Initialization Failed

Started by Valmian Nov 18, 2004 at 3:55 PM 7 replies 2.7k views
Original Post
Valmian
Valmian
When I tried to initialize D3D with Dx 9.0c it fails. I looked at dxdiag and it seems to be installed right. What can be the problem? Thank you, Ilya
OrenGL
OrenGL
post the code so we can help or look for examples, there are about a zillon.
Don't shoot! I'm with the science team.....
S1CA
S1CA
What does the debug output tell you when the debug Direct3D runtimes are selected in the control panel and your application is run in a debugger (or with a debug output viewer) ?

When a DirectX call fails, if the debug runtimes are in use, then as well as returning an error code (such as D3DERR_INVALIDCALL), the runtime will also output a message such as "Direct3D9: (ERROR) :Invalid value for BackBufferFormat. ValidatePresentParameters fails" to your debug output window.

[see the FAQ for this forum for more information about debugging DirectX applications]
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
Valmian
Valmian
Quote:
Original post by OrenGL
post the code so we can help or look for examples, there are about a zillon.

Here is where it fails:
CBase::m_pD3D = Direct3DCreate9(D3D_SDK_VERSION);	if(CBase::m_pD3D==NULL)        return E_FAIL;
Valmian
Valmian
It worked with 9.0b
Valmian
Valmian
And it does not do an "error", rather, it just returns NULL, no errors, no debug problems.
Moe
Moe
Is DirectX 9.0c installed on your machine?
kingnosis
kingnosis
Compiler error or runtime error?

If it's a compiler error, then maybe it can't find the libs or the headers. Did you set the directories in Project->Settings? Tell us what it says.

If it's a runtime error, then the only thing I can think of is that maybe the drivers for your card aren't supported, or something along those lines.

EDIT: Since you said it worked with 9.0b but not with 9.0c, then your runtime dlls are probably 9.0b while your header files and libs are 9.0c. Calling the Direct3DCreate9(D3D_SDK_VERSION) function asks for 9.0c when the runtimes are only b. That would make that error make sense to me.

Topic Locked

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

Sign in to reply to this topic.