projects
/
ld42_outofspace
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I don't think I'll bother any more with this, so I'll just make it start
[ld42_outofspace]
/
src
/
main.cc
diff --git
a/src/main.cc
b/src/main.cc
index
ca23fbc
..
fca4fd9
100644
(file)
--- a/
src/main.cc
+++ b/
src/main.cc
@@
-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);
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);
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);
glLoadIdentity();
glOrtho(0, win_width, 0, win_height, -1, 1);
+ glPushAttrib(GL_ENABLE_BIT);
glDisable(GL_LIGHTING);
glRasterPos2f(1, 1);
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++);
}
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, *text++);
}
- glEnable(GL_LIGHTING);
+ glPopAttrib();
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);