Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: VBOs / glDrawArrays bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VBOs / glDrawArrays bug?



Hi,

OpenGL draws an extra vertex at what looks like (0, 0, 0).  If I draw
a 4x4 grid of points, I get 17 points whereas if I draw a 3x3 grid I
actually get 9.

I think you're passing the number of primitives to draw incorrectly. In your test case you're passing mDrawSize (=48), whereas it should be 16. If I change the glDrawArrays call to draw mDrawSize/3 primitives then I correctly get 16 points on the screen.

In the other cases it was probably just reading somewhere off memory,
so it could crash, or display points at zero coordinates (if memory
would be mapped but happened to have zeroes), or display some garbage.

--
Aras Pranckevicius
Graphics programmer at unity3d.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >VBOs / glDrawArrays bug? (From: "Wesley Smith" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.