Sign in to follow this  
d07RiV

D3DCREATE_HARDWARE_VERTEXPROCESSING and such

Recommended Posts

I have been writing an engine for a while on my old computer, but now I have moved onto a laptop and it didn't work (failed to initialize Direct3D). After investigating it turned out that the laptop didn't support D3DCREATE_HARDWARE_VERTEXPROCESSING (in fact, hardly any computer did). So I changed it to D3DCREATE_SOFTWARE_VERTEXPROCESSING and it worked, but for some reason half the polygons weren't rendering. And as I move around the polygons that aren't rendering change (as in, I see one half of the ceiling then I move and I see the other half of the ceiling). My engine is drawing things simply by doing DrawIndexedPrimitive with relatively small number of vertices, and it worked fine on the other machine so the only sources of bugs I can imagine are changing from hardware to software vertexprocessing, and somewhat less capable GPU. It will take me a while to find what exactly is causing this behavior so I'm looking for tips on what could cause it.

Share this post


Link to post
Share on other sites
The right thing to do is check the D3DDEVCAPS_HWTRANSFORMANDLIGHT cap to see if the card supports hardware vertex processing. You can also test the vertex shader level, if you're using that. Depending on that, create a software or hardware vertex processing device.

The polygons not showing might not be related. It likely has to do with the card on your old computer ignoring problems with your code. First of all, I'd suggest enabling the debug runtime to see if there are any messages.

Likely suspects are that you're not supplying the correct parameters to DrawIndexedPrimitive (in particular, NumVertices), and that you don't set clipping correctly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this