Skip to content

Commit 65d297b

Browse files
committed
Correct conditional GL.
1 parent 57039d6 commit 65d297b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

calib_camera.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,26 +1054,23 @@ void drawView(void)
10541054
// Setup for drawing on screen, with correct orientation for user.
10551055
//
10561056
glViewport(0, 0, contextWidth, contextHeight);
1057-
#if !HAVE_GLES2
1058-
glMatrixMode(GL_PROJECTION);
1059-
glLoadIdentity();
1060-
#else
1061-
mtxLoadIdentityf(p);
1062-
#endif // !HAVE_GLES2
10631057
bottom = 0.0f;
10641058
top = (float)contextHeight;
10651059
left = 0.0f;
10661060
right = (float)contextWidth;
10671061
#if !HAVE_GLES2
1062+
glMatrixMode(GL_PROJECTION);
1063+
glLoadIdentity();
10681064
glOrtho(left, right, bottom, top, -1.0f, 1.0f);
10691065
glMatrixMode(GL_MODELVIEW);
10701066
glLoadIdentity();
10711067
#else
1068+
mtxLoadIdentityf(p);
10721069
mtxOrthof(p, left, right, bottom, top, -1.0f, 1.0f);
10731070
mtxLoadIdentityf(m);
1074-
#endif // !HAVE_GLES2
10751071
glUseProgram(program);
10761072
glUniformMatrix4fv(uniforms[UNIFORM_MODELVIEW_PROJECTION_MATRIX], 1, GL_FALSE, p);
1073+
#endif // !HAVE_GLES2
10771074

10781075
EdenGLFontSetViewSize(right, top);
10791076
EdenMessageSetViewSize(right, top);

0 commit comments

Comments
 (0)