Simple Direct3D Error

Alrighty, here is how it is. Microsoft posted this code for one of its tutorials, however it does not work. It's not a compiler error, so i had to track it down and here is what I found.

g_pD3D->CreateDevice( D3DADAPTER_DEFAULT,
&g_pd3dDevice ) )


It returns the following error message: D3DERR_INVALIDCALL
The error lookup says the following about the error:
"The method call is invalid. For example, a method's parameter may have an invalid value. "

The Struct d3dpp contains:

d3dpp.Windowed = TRUE;
d3dpp.BackBufferFormat = d3ddm.Format;


The Struct g_pd3dDevice contains the info put into it by:

g_pD3D->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &d3ddm )


I'm using DirectX 8.0 and everything else works as it should up until that point. 0 warnings, 0 errors
ANY help would be great because this is the error that I get when trying to run any of the samples. Oh yeah, I have a Voodoo 3 3000 if that matters.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!