Jump to content
  • Advertisement
Sign in to follow this  

Vertex Buffer Objects & Indices (part2)

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

Why would the following line NOT render

But this call DOES render:

[Edited by - WilyCoder on June 30, 2005 3:34:21 PM]

Share this post

Link to post
Share on other sites
youre using it incorrectly read the spec

void DrawRangeElements( enum mode, uint start,
uint end, sizei count, enum type, void *indices );
is a restricted form of DrawElements. mode, count, type, and indices match the
corresponding arguments to DrawElements, with the additional constraint that all
values in the array indices must lie between start and end inclusive.

Share this post

Link to post
Share on other sites
EDIT: I fixed it :)

Here are the correct parameters for win32 opengl (didnt test on linux yet):

Breakdown of the parameters:
Start: - Start with first index in the array of indices
End: - The last index of array
Size: How many indices you want drawn
Pointer To Indices: set to 0 if using VBOs

I had seen a few different versions of glDrawRangeElements() on the net....

Zeek: Good call :)

[Edited by - WilyCoder on June 30, 2005 11:23:34 PM]

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!