Archived

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

D3D8 - DrawIndexedPrimitive arguments?

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

Confusing isn''t it...
Well from what I have been reading I think it is like this:
(I''m not 100% sure soo please correct me if I got it wrong).


HRESULT DrawIndexedPrimitive(
D3DPRIMITIVETYPE Type, // Trianglestrip/list etc.
UINT MinIndex, // The lowest index number used in the indexbuffer (ie lowest index in the buffer is 100, then set it to 100)
UINT NumVertices, // Number of vertices in the buffer
UINT StartIndex, // Where to start in the IB to read indexvalues (usually 0 since you set start params in SetIndices)
UINT PrimitiveCount // How many primitives to render.
);
[/CODE]

Share this post


Link to post
Share on other sites
quote:
Original post by Nedelman

What''s the difference between MinIndex and StartIndex in the call to DrawIndexedPrimitive()? Thanks in advance.




Right - the MinIndex is the lowest index number into the
vertex buffer that is used. I.e. with an index list of
10, 12, 8, 4, 14 it would be 4.
StartIndex is the start position within the index buffer
that you are going to start drawing primitives from.
Say if you had an index buffer of 100 indicies and your
primitive started at the 20th entry - StartIndex would
be 20.

MrF.


--
Code..reboot..code..reboot..sigh!

Share this post


Link to post
Share on other sites