summaryrefslogtreecommitdiffstats
path: root/progs/glsl/skinning.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/glsl/skinning.c')
-rw-r--r--progs/glsl/skinning.c27
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);