aboutsummaryrefslogtreecommitdiff
path: root/src/glcheck.c
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-06-04 17:41:17 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-06-04 17:41:17 +0000
commit1d6f4ec66dcc67df510feaaf7b8a2f078205ceb2 (patch)
tree66e36950c624666ec1a255cec2fa4cc6d63d1756 /src/glcheck.c
parent16e42ddffb21eb3a7f019db7c39c99d69aeb0270 (diff)
GLEWise the test program
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@73 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'src/glcheck.c')
-rw-r--r--src/glcheck.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/glcheck.c b/src/glcheck.c
index 9d375ee..c614f62 100644
--- a/src/glcheck.c
+++ b/src/glcheck.c
@@ -16,8 +16,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
-#include <gl.h>
-#include <glu.h>
+#include <glew.h>
#include <glut.h>
GLuint buffer;
@@ -87,8 +86,8 @@ static void glcheck_setup() {
GLuint vert, frag;
glGenBuffers(1, &buffer);
- glBindBuffer(buffer);
- glBindBuffer(0);
+ glBindBuffer(GL_ARRAY_BUFFER, buffer);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
vert = render_load_shader(DATADIR"/shaders/lighting.vert", GL_VERTEX_SHADER);
frag = render_load_shader(DATADIR"/shaders/lighting.frag", GL_FRAGMENT_SHADER);
@@ -161,6 +160,8 @@ int main(int argc, char *argv[]) {
glutInitWindowSize(512, 512);
window = glutCreateWindow("Thrust3D GLcheck");
+ glewInit();
+
glcheck_setup();
glutTimerFunc(10.0, glcheck_update, 0.0);
glutDisplayFunc(glcheck_draw);