Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


DrawIndexedPrimitive(): Still Don't Understand Parameters

This topic is 5217 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

I've been working with indexed primitives for a while, and the second third and fourth parameters I always set to 0, because I didn't need to render multiple objects from the same buffer. Now that I do, I am completely confused about those certain parameters. MSDN isn't helpful, because the way they describe the parameters for the function is confusing me even more! Basically, I need to render usually 2 or more different objects from the same index and vertex buffers in a for loop, using the DrawIndexedPrimitive, and I do not understand what parameters 2, 3, and 4 do exactly. And don't quote MSDN. [edited by - jtmerchant on April 4, 2004 1:02:35 AM]

Share this post

Link to post
Share on other sites
something like

trianglelist,0,0,vertexNumber, index,triangleNo

vertexNum refers to the total count of vertices that are stored in the current vb, index is where in the array to look a the index list. and triangleNo the number of triangles to draw from that.

so if you create 2 triangles out of six indices you have index=0, triangleNo=2 i think

Share this post

Link to post
Share on other sites

  • 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!