glBegin( GL_POLYGON ); and co... |
Author :
blotfib
Post Date :
2006-03-30 09:26
Posts :
9
|
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 |
Author :
grant
Post Date :
2006-03-30 09:47
Posts :
117
|
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 |
Author :
chandramuralis
Post Date :
2006-07-31 14:34
Posts :
4
|
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? |
Author :
grant
Post Date :
2006-07-31 16:05
Posts :
117
|
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 |
All Rights Reserved, © Zeus Communications, Multimedia & Development 2004-2005