Sign in to follow this  

Vertex Buffer Objects & Indices (part2)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this