PDA

View Full Version : OpenGL ES questions, iPhone Development




RPGamerL99
Jul 3, 2008, 01:06 AM
Since the Begin/End statements are gone, how would i turn a GL QUADS with four points listed, into OpenGL ES, because quads aren't supported either.



nokq
Jul 4, 2008, 10:17 PM
Since the Begin/End statements are gone, how would i turn a GL QUADS with four points listed, into OpenGL ES, because quads aren't supported either.

You must use glDrawElements or glDrawArrays listed here

http://www.khronos.org/opengles/documentation/opengles1_1/gl_egl_ref_1_1_20041110/index.html

Note you can represent anything like quads with the triangle primitives. Uses two triangles to represent the quad.

Cromulent
Jul 5, 2008, 05:20 AM
Not sure specifically about OpenGL ES but you should not use glBegin and glEnd anyway. Use PBOs and VBOs. They are much faster, more modern and more efficient.

The old begin / end syntax is about 10 years out of date, luckily as has already been mentioned it is not available in ES.

Edit : Booo! 3,000 posts. Do I win a prize? :)

HiRez
Jul 5, 2008, 11:10 AM
Edit : Booo! 3,000 posts. Do I win a prize? :)Well yes, you're a Demi-God now. Congrats, I guess, although I hear demi-gods just get more work and the pay remains the same so good luck with that.

Cromulent
Jul 5, 2008, 11:13 AM
Well yes, you're a Demi-God now. Congrats, I guess, although I hear demi-gods just get more work and the pay remains the same so good luck with that.

Heh, I've been one of them for ages :).

Nothing special, just means you contribute $25 a year for the running of the site.