fixed: front and back camera wouldn't render anything

Fri, 23 Aug 2013 00:54:31 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 23 Aug 2013 00:54:31 +0300
changeset 476
baa35b4b67dc
parent 475
1f5ab7410e4d
child 477
73d65b279ec2

fixed: front and back camera wouldn't render anything

src/gldraw.cpp file | annotate | diff | comparison | revisions
--- a/src/gldraw.cpp	Thu Aug 22 20:39:26 2013 +0300
+++ b/src/gldraw.cpp	Fri Aug 23 00:54:31 2013 +0300
@@ -358,7 +358,7 @@
 	glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 	glEnable (GL_DEPTH_TEST);
 	
-	if (m_camera != GLRenderer::Free) {
+	if (m_camera != Free) {
 		glMatrixMode (GL_PROJECTION);
 		glPushMatrix();
 		
@@ -366,9 +366,11 @@
 		glOrtho (-m_virtWidth, m_virtWidth, -m_virtHeight, m_virtHeight, -100.0f, 100.0f);
 		glTranslatef (m_panX, m_panY, 0.0f);
 		
-		glRotatef (90.0f, g_staticCameras[m_camera].glrotate[0],
-			g_staticCameras[m_camera].glrotate[1],
-			g_staticCameras[m_camera].glrotate[2]);
+		if (m_camera != Front && m_camera != Back) {
+			glRotatef (90.0f, g_staticCameras[m_camera].glrotate[0],
+				g_staticCameras[m_camera].glrotate[1],
+				g_staticCameras[m_camera].glrotate[2]);
+		}
 		
 		// Back camera needs to be handled differently
 		if (m_camera == GLRenderer::Back) {

mercurial