Menu
Forums
Login | Register

Home > Forums > OpenGL ES > glBegin( GL_POLYGON ); and co... Page :  1 
glBegin( GL_POLYGON ); and co...
Hi

Does any one knows about some routines for the ES version that do same things as glBegin( GL_POLYGON )....
instead of working with triangles...

Thanks
Hi,

Unfortunately OpenGL ES does not support glBegin or the GL_POLYGON flag.

This has been done as the glBegin and glEnd functions are extremely innefficient when compared to the glDrawArrays and glDrawElements function.

There are also additional complexities involved with using GL_POLYGON and GL_QUADS rather than GL_TRIANGLES.

This has all been done to optimize OpenGL for mobile devices.

Regards,
Grant
Hi Grant,
Is there any workaround for the functions that are not supported by OpenGL ES. For example, instead of using glBegin() can I use glDrawArrays() and how to use it?
Hi,

Yes, you can use glDrawArrays or glDrawElements.

An example of how glDrawArrays can be used is provided on :

http://www.zeuscmd.com/tutorials/opengles/13-SolidShapes.php

glDrawElements is similar except that it accepts a set of indices used to index vertices in a separate array.

Regards,
Grant

Home > Forums > OpenGL ES > glBegin( GL_POLYGON ); and co... Page :  1 

You need to be logged in to reply to this topic.


All Rights Reserved, © Zeus Communications, Multimedia & Development 2004-2005

Read the Disclaimer

Links