views:

2618

answers:

5

There are number of functions that exist in OpenGL but not in OpenGLES 1.1 (for iPhone).

Is there a list or resource that lists some alternative functions that can be used in OpenGLES 1.1?

For example:

  • gluOrtho2D
  • glPolygonMode
  • glVertex3f

etc?

Thanks

+1  A: 

You should be able to substitute glOrtho for gluOrtho2D. The only extra thing you have to do is set your near and far clipping planes.

It looks as though glPolygonMode is not part of the OpenGLES spec because only filled triangles are supported. See here.

geofftnz
+2  A: 

from the man page for gluOrtho2D

DESCRIPTION

gluOrtho2D sets up a two-dimensional orthographic viewing
region. This is equivalent to calling glOrtho with near=-1
and far=1.

Instead of using glVertex3f you must use Vertex Arrays see link

epatel
+7  A: 

The "OpenGL ES 1.1.12 Difference Specification" (http://www.khronos.org/registry/gles/specs/1.1/es_cm_spec_1.1.12.pdf) lists the differences between OpenGL ES 1.X and OpenGL 1.5.

The iPhone uses OpenGL ES 1.1

I would also recommend you make a list of the OpenGL functions you call and check the ES documentation to see if they are wholly/partially supported.

Andrew Grant
+2  A: 

Numerous convenience functions have been stripped in the OpenGLES standard for simplicity, as well as inefficient depreciated functions.

There where mainly to make commonly used features easier, or provide optimized implementations of common commands.

The two examples you have given gluOrtho2D is just a wrapper for glOrtho, and glPolygonMode can be achived with glTriangle's with a bit of pre-processing.

Im not sure of a list perse, but if a function doesnt exist, most probably the man page will tell you what similar functions it acts as a wrapper for, or the alternatives you can use.

Akusete