Reputation: 1096
Do anyone tried GLPaint sample application with OpenGl ES 2.0 ? I had a try an got errors with glMatrixMode(), glPointSize(), glOrthof(), glTexEnvf()
methods .
Upvotes: 3
Views: 1318
Reputation: 385690
All of those errors are because the code uses functions and constants that were removed in OpenGL ES 2.0. If you want to make that app use OpenGL ES 2.0, you will have to replace those calls with code that uses OpenGL ES 2.0 functions only.
There are significant differences between OpenGL ES 1.1 and OpenGL ES 2.0. Porting an app from 1.1 to 2.0 is not trivial. You will need to learn quite a bit about both OpenGL ES 1.1 and OpenGL ES 2.0 to port the app.
For the specific functions you mentioned:
glMatrixMode
and glOrthof
have no replacements in OpenGL ES 2.0. You are expected to provide your own vector/matrix math code. If you are targeting iOS 5.0, you will want to look at the GLKMath
part of the GLKit
framework.
glPointSize
is replaced by the gl_PointSize
variable in the vertex shader.
glTexEnvf
is replaced by vertex and fragment shaders.
Upvotes: 4