开发者

OpenGL ES rotate the world

How i can rotate the all world by 15 degrees on 开发者_如何学编程the Z axis?


glRotatef(15, 0, 0, 1);

http://www.khronos.org/opengles/documentation/opengles1_0/html/glRotate.html


The solution is:

gl.glMatrixMode(GL10.GL_PROJECTION);
        gl.glLoadIdentity();

        GLU.gluPerspective(gl, 45.0f, (float) width / (float) height, 0.1f, 100.0f);

        GLU.gluLookAt(gl, 0, -5, 0,   0.0f, 0.0f, -15.0f,    0.0f, 1.0f, 0.0f);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜