Skip to content

Commit 8c03b45

Browse files
author
pandamicro
committed
Fix 3D projection
1 parent 6325b10 commit 8c03b45

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cocos2d/core/CCDirectorWebGL.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,14 @@ cc.game.addEventListener(cc.game.EVENT_RENDERER_INITED, function () {
9898

9999
cc.kmGLMultMatrix(matrixPerspective);
100100

101-
cc.kmGLMatrixMode(cc.KM_GL_MODELVIEW);
102-
cc.kmGLLoadIdentity();
103101
var eye = new cc.math.Vec3(-ox + size.width / 2, -oy + size.height / 2, zeye);
104102
var center = new cc.math.Vec3( -ox + size.width / 2, -oy + size.height / 2, 0.0);
105103
var up = new cc.math.Vec3( 0.0, 1.0, 0.0);
106104
matrixLookup.lookAt(eye, center, up);
107105
cc.kmGLMultMatrix(matrixLookup);
106+
107+
cc.kmGLMatrixMode(cc.KM_GL_MODELVIEW);
108+
cc.kmGLLoadIdentity();
108109
break;
109110
case cc.Director.PROJECTION_CUSTOM:
110111
if (_t._projectionDelegate)

0 commit comments

Comments
 (0)