gldraw.cpp

changeset 144
b2b8b45f6f5f
parent 143
e3c37b950a68
child 145
ddf24c380be6
--- a/gldraw.cpp	Sat Apr 27 02:17:03 2013 +0300
+++ b/gldraw.cpp	Sat Apr 27 02:52:32 2013 +0300
@@ -112,11 +112,8 @@
 	
 	darkbg = luma (col) < 80;
 	
-	glClearColor (
-		((double)col.red()) / 255.0f,
-		((double)col.green()) / 255.0f,
-		((double)col.blue()) / 255.0f,
-		1.0f);
+	col.setAlpha (255);
+	qglClearColor (col);
 }
 
 // =============================================================================
@@ -246,9 +243,10 @@
 	height = h;
 	
 	glViewport (0, 0, w, h);
+	glMatrixMode (GL_PROJECTION);
 	glLoadIdentity ();
-	glMatrixMode (GL_PROJECTION);
 	gluPerspective (45.0f, (double)w / (double)h, 0.1f, 100.0f);
+	glMatrixMode (GL_MODELVIEW);
 }
 
 // =============================================================================

mercurial