summaryrefslogtreecommitdiffstats
path: root/progs/glsl/points.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/points.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/points.c')
-rw-r--r--progs/glsl/points.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/progs/glsl/points.c b/progs/glsl/points.c
index 1b346228aa1..e5ee38c449f 100644
--- a/progs/glsl/points.c
+++ b/progs/glsl/points.c
@@ -11,10 +11,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"
@@ -100,7 +97,7 @@ Redisplay(void)
*/
glPushMatrix();
glTranslatef(0, 1.2, 0);
- glUseProgram_func(0);
+ glUseProgram(0);
DrawPoints(GL_FALSE);
glPopMatrix();
@@ -109,9 +106,9 @@ Redisplay(void)
*/
glPushMatrix();
glTranslatef(0, -1.2, 0);
- glUseProgram_func(Program);
+ glUseProgram(Program);
if (uViewportInv != -1) {
- glUniform2f_func(uViewportInv, 1.0 / WinWidth, 1.0 / WinHeight);
+ glUniform2f(uViewportInv, 1.0 / WinWidth, 1.0 / WinHeight);
}
DrawPoints(GL_TRUE);
glPopMatrix();
@@ -151,9 +148,9 @@ Key(unsigned char key, int x, int y)
Smooth = !Smooth;
break;
case 27:
- glDeleteShader_func(FragShader);
- glDeleteShader_func(VertShader);
- glDeleteProgram_func(Program);
+ glDeleteShader(FragShader);
+ glDeleteShader(VertShader);
+ glDeleteProgram(Program);
glutDestroyWindow(Win);
exit(0);
}
@@ -226,17 +223,15 @@ 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);
- uViewportInv = glGetUniformLocation_func(Program, "viewportInv");
+ uViewportInv = glGetUniformLocation(Program, "viewportInv");
- glUseProgram_func(0);
+ glUseProgram(0);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}