Archived

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

jtmerchant

DrawIndexedPrimitive(): Still Don't Understand Parameters

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