summaryrefslogtreecommitdiff
path: root/progs/glsl/twoside.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/glsl/twoside.c')
-rw-r--r--progs/glsl/twoside.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/progs/glsl/twoside.c b/progs/glsl/twoside.c
index 9ebc4ec360..b6c1b477dd 100644
--- a/progs/glsl/twoside.c
+++ b/progs/glsl/twoside.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"
@@ -60,11 +57,11 @@ Redisplay(void)
glFrontFace(FrontWinding);
if (DetermineFacingInFragProg) {
- glUniform1i_func(u_fragface, 1);
+ glUniform1i(u_fragface, 1);
glDisable(GL_VERTEX_PROGRAM_TWO_SIDE);
}
else {
- glUniform1i_func(u_fragface, 0);
+ glUniform1i(u_fragface, 0);
glEnable(GL_VERTEX_PROGRAM_TWO_SIDE);
}
@@ -76,7 +73,7 @@ Redisplay(void)
/* Draw a tristrip ring */
glBegin(GL_TRIANGLE_STRIP);
glColor4fv(Red);
- glSecondaryColor3fv_func(Green);
+ glSecondaryColor3fv(Green);
for (i = 0; i <= sections; i++) {
float a = (float) i / (sections) * M_PI * 2.0;
float x = radius * cos(a);
@@ -126,9 +123,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,15 +227,13 @@ Init(void)
if (!ShadersSupported())
exit(1);
- GetExtensionFuncs();
-
vertShader = CompileShaderText(GL_VERTEX_SHADER, vertShaderText);
fragShader = CompileShaderText(GL_FRAGMENT_SHADER, fragShaderText);
program = LinkShaders(vertShader, fragShader);
- glUseProgram_func(program);
+ glUseProgram(program);
- u_fragface = glGetUniformLocation_func(program, "fragface");
+ u_fragface = glGetUniformLocation(program, "fragface");
printf("Uniforms: %d\n", u_fragface);
/*assert(glGetError() == 0);*/
@@ -247,9 +242,9 @@ Init(void)
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
- assert(glIsProgram_func(program));
- assert(glIsShader_func(fragShader));
- assert(glIsShader_func(vertShader));
+ assert(glIsProgram(program));
+ assert(glIsShader(fragShader));
+ assert(glIsShader(vertShader));
glEnable(GL_DEPTH_TEST);