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?
我开始学习OpenGL使用iOS系统。我想知道为什么在
1 个解决方案
#1
5
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.
固定的函数管道,包括在矩阵中构建的函数,完全从OpenGL ES 2.0中取出,所以像gl_投影等常量,以及glPushMatrix、glRotate、glMatrixMode等函数都被删除了。
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.
此更改要求您编写着色器并将您自己的模型和投影矩阵传递/计算到它。虽然es2为您提供了更多的灵活性,但它也使您很难使用较旧的代码并作为初学者开始工作。
If you don't have a full understanding of how the projection and model matrices, you may want to stick with ES 1.
如果你对投影和模型矩阵没有完全的理解,你可能想要坚持ES 1。
A Presentation with a further explanation can be found here
在这里可以找到一个有进一步解释的演示文稿
#1
5
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.
固定的函数管道,包括在矩阵中构建的函数,完全从OpenGL ES 2.0中取出,所以像gl_投影等常量,以及glPushMatrix、glRotate、glMatrixMode等函数都被删除了。
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.
此更改要求您编写着色器并将您自己的模型和投影矩阵传递/计算到它。虽然es2为您提供了更多的灵活性,但它也使您很难使用较旧的代码并作为初学者开始工作。
If you don't have a full understanding of how the projection and model matrices, you may want to stick with ES 1.
如果你对投影和模型矩阵没有完全的理解,你可能想要坚持ES 1。
A Presentation with a further explanation can be found here
在这里可以找到一个有进一步解释的演示文稿