summaryrefslogtreecommitdiff
path: root/progs/trivial/quad-tex-3d.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/trivial/quad-tex-3d.c')
-rw-r--r--progs/trivial/quad-tex-3d.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/progs/trivial/quad-tex-3d.c b/progs/trivial/quad-tex-3d.c
index 0b2dcc08a5..d05131d3b8 100644
--- a/progs/trivial/quad-tex-3d.c
+++ b/progs/trivial/quad-tex-3d.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -39,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
@@ -159,14 +161,16 @@ int main(int argc, char **argv)
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
- type = GLUT_RGB;
+ type = GLUT_RGB | GLUT_ALPHA;
type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
glutInitDisplayMode(type);
- if (glutCreateWindow("First Tri") == GL_FALSE) {
+ if (glutCreateWindow(*argv) == GL_FALSE) {
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);