How do I rotate an object using OpenGL ES 2.0?
问题 In OpenGL ES 1.1, you can use glRotatef() to rotate a model, but that function doesn't exist in OpenGL ES 2.0. Therefore, how do you perform rotation in OpenGL ES 2.0? 回答1: To follow on what Christian's said, you'll need to keep track of the model view matrix yourself and manipulate that to perform the rotations you need. You'll then pass in the matrix as a uniform to your shader, and do something like the following: attribute vec4 position; uniform mat4 modelViewProjMatrix; void main() { gl