diff options
author | Brian Paul <[email protected]> | 2009-07-17 13:23:11 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-07-17 13:23:11 -0600 |
commit | ee0b1bc7d3fe659e0ed2f34a61b322f2bd2b8843 (patch) | |
tree | 7b171b2a4465d170f02f12306e55db90b0e0a868 /progs/glsl/skinning.c | |
parent | a77b455af05c9987bd0d94084dadb61fe69b17d0 (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/skinning.c')
-rw-r--r-- | progs/glsl/skinning.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/progs/glsl/skinning.c b/progs/glsl/skinning.c index d7b968fed05..65ba98348b6 100644 --- a/progs/glsl/skinning.c +++ b/progs/glsl/skinning.c @@ -13,10 +13,7 @@ #include <stdlib.h> #include <math.h> #include <GL/glew.h> -#include <GL/gl.h> #include <GL/glut.h> -#include <GL/glext.h> -#include "extfuncs.h" #include "shaderutil.h" @@ -65,11 +62,11 @@ Cylinder(GLfloat length, GLfloat radius, GLint slices, GLint stacks) float a = (float) i / (slices - 1) * M_PI * 2.0; float x = radius * cos(a); float y = radius * sin(a); - glVertexAttrib1f_func(WeightAttr, w0); + glVertexAttrib1f(WeightAttr, w0); glNormal3f(x, y, 0.0); glVertex3f(x, y, z0); - glVertexAttrib1f_func(WeightAttr, w0 + dw); + glVertexAttrib1f(WeightAttr, w0 + dw); glNormal3f(x, y, 0.0); glVertex3f(x, y, z0 + dz); } @@ -107,8 +104,8 @@ Redisplay(void) { UpdateMatrices(); - glUniformMatrix4fv_func(uMat0, 1, GL_FALSE, Matrices[0]); - glUniformMatrix4fv_func(uMat1, 1, GL_FALSE, Matrices[1]); + glUniformMatrix4fv(uMat0, 1, GL_FALSE, Matrices[0]); + glUniformMatrix4fv(uMat1, 1, GL_FALSE, Matrices[1]); if (WireFrame) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); @@ -149,9 +146,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); } @@ -222,18 +219,16 @@ 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); - uMat0 = glGetUniformLocation_func(program, "mat0"); - uMat1 = glGetUniformLocation_func(program, "mat1"); + uMat0 = glGetUniformLocation(program, "mat0"); + uMat1 = glGetUniformLocation(program, "mat1"); - WeightAttr = glGetAttribLocation_func(program, "weight"); + WeightAttr = glGetAttribLocation(program, "weight"); assert(glGetError() == 0); |