summaryrefslogtreecommitdiffstats
path: root/progs/glsl/bump.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-07-17 13:23:11 -0600
committerBrian Paul <[email protected]>2009-07-17 13:23:11 -0600
commitee0b1bc7d3fe659e0ed2f34a61b322f2bd2b8843 (patch)
tree7b171b2a4465d170f02f12306e55db90b0e0a868 /progs/glsl/bump.c
parenta77b455af05c9987bd0d94084dadb61fe69b17d0 (diff)
progs/glsl: finish conversion to GLEW
This is a follow-on to b799af91d5ffbee1481161fec29eb4c92b161272. Remove _func function suffix and unneeded #includes.
Diffstat (limited to 'progs/glsl/bump.c')
-rw-r--r--progs/glsl/bump.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/progs/glsl/bump.c b/progs/glsl/bump.c
index c401e590f74..ddb986abcb5 100644
--- a/progs/glsl/bump.c
+++ b/progs/glsl/bump.c
@@ -9,10 +9,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
-#include <GL/glu.h>
-#include <GL/glext.h>
-#include "extfuncs.h"
#include "shaderutil.h"
@@ -60,7 +58,7 @@ static void
Square(GLfloat size)
{
glNormal3f(0, 0, 1);
- glVertexAttrib3f_func(tangentAttrib, 1, 0, 0);
+ glVertexAttrib3f(tangentAttrib, 1, 0, 0);
glBegin(GL_POLYGON);
glTexCoord2f(0, 0); glVertex2f(-size, -size);
glTexCoord2f(1, 0); glVertex2f( size, -size);
@@ -164,9 +162,9 @@ Reshape(int width, int height)
static void
CleanUp(void)
{
- glDeleteShader_func(fragShader);
- glDeleteShader_func(vertShader);
- glDeleteProgram_func(program);
+ glDeleteShader(fragShader);
+ glDeleteShader(vertShader);
+ glDeleteProgram(program);
glutDestroyWindow(win);
}
@@ -230,17 +228,15 @@ Init(void)
if (!ShadersSupported())
exit(1);
- GetExtensionFuncs();
-
vertShader = CompileShaderFile(GL_VERTEX_SHADER, VertProgFile);
fragShader = CompileShaderFile(GL_FRAGMENT_SHADER, FragProgFile);
program = LinkShaders(vertShader, fragShader);
- glUseProgram_func(program);
+ glUseProgram(program);
- assert(glIsProgram_func(program));
- assert(glIsShader_func(fragShader));
- assert(glIsShader_func(vertShader));
+ assert(glIsProgram(program));
+ assert(glIsShader(fragShader));
+ assert(glIsShader(vertShader));
assert(glGetError() == 0);
@@ -250,7 +246,7 @@ Init(void)
CheckError(__LINE__);
- tangentAttrib = glGetAttribLocation_func(program, "Tangent");
+ tangentAttrib = glGetAttribLocation(program, "Tangent");
printf("Tangent Attrib: %d\n", tangentAttrib);
assert(tangentAttrib >= 0);