I don't think I'll bother any more with this, so I'll just make it start
[ld42_outofspace] / src / main.cc
index ca23fbc..fca4fd9 100644 (file)
@@ -30,6 +30,11 @@ int main(int argc, char **argv)
        glutInit(&argc, argv);
        glutInitWindowSize(1024, 600);
        glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_SRGB | GLUT_MULTISAMPLE);
+
+       glutInitContextVersion(3, 0);
+       glutInitContextProfile(GLUT_COMPATIBILITY_PROFILE);
+       glutInitContextFlags(GLUT_DEBUG);
+
        glutCreateWindow("ludum dare 42");
 
        glutDisplayFunc(display);
@@ -94,6 +99,7 @@ void draw_text(float x, float y, float r, float g, float b, const char *fmt, ...
        glLoadIdentity();
        glOrtho(0, win_width, 0, win_height, -1, 1);
 
+       glPushAttrib(GL_ENABLE_BIT);
        glDisable(GL_LIGHTING);
 
        glRasterPos2f(1, 1);
@@ -102,7 +108,7 @@ void draw_text(float x, float y, float r, float g, float b, const char *fmt, ...
                glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, *text++);
        }
 
-       glEnable(GL_LIGHTING);
+       glPopAttrib();
 
        glPopMatrix();
        glMatrixMode(GL_MODELVIEW);