开发者

Missing methods and constants in OpenGL ES 2.0 headers

I'm starting to learn to OpenGL for using it with iOS. I'm wondering why methods like glMatrixMode or constants like GL_PROJECTION are there in <OpenGLES/ES1/gl.h>, but not in <OpenGLES/ES2/gl.h>. Why? Are you enforced to write your own shaders开发者_运维问答 when using OpenGL ES 2.0 instead of 1.1?


The Fixed function pipeline, including the built in matrices were completely taken out of OpenGL ES 2.0 so constants like GL_PROJECTION, and functions such as glPushMatrix, glRotate, glMatrixMode etc have been removed.

This change requires you to write shaders and pass/calculate your own model and projection matrices to it. While ES 2 provides you with much more flexibility it also makes it very difficult to work with older code and get started as a beginner.

If you don't have a full understanding of how the projection and model matrices, you may want to stick with ES 1.

A Presentation with a further explanation can be found here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜