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.

[code]
g_pD3D->CreateDevice( D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp,
&g_pd3dDevice ) )
[/code]

--------------------------------------------------------------------------------

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:

[code]
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = d3ddm.Format;
[/code]

--------------------------------------------------------------------------------

The Struct g_pd3dDevice contains the info put into it by:

[code]
g_pD3D->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &d3ddm )
[/code]

--------------------------------------------------------------------------------

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!

Categories