Jump to content
  • Advertisement
Sign in to follow this  
Calin

IDirect3DDevice::DrawIndexedPrimitive in DX9

This topic is 4833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I have DX9 SDK installed. I am using a DX8 tutorial on terrain creation. The tutorial refers to IDirect3DDevice::DrawIndexedPrimitive8 function. My question is can I just replace 8 with 9 or there is more to do to make DrawIndexedPrimitive work under DX9 SDK. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
d3d9:

HRESULT DrawIndexedPrimitive(
D3DPRIMITIVETYPE Type,
INT BaseVertexIndex,
UINT MinIndex,
UINT NumVertices,
UINT StartIndex,
UINT PrimitiveCount
);


d3d8:

HRESULT DrawIndexedPrimitive(
D3DPRIMITIVETYPE Type,
UINT MinIndex,
UINT NumVertices,
UINT StartIndex,
UINT PrimitiveCount
);


If you're just converting a D3D8 app to D3D9 pass 0 to the BaseVertexIndex parameter in the d3d9 function.

Click here for info about the BaseVertexIndex parameter.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!