From ee0b1bc7d3fe659e0ed2f34a61b322f2bd2b8843 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 17 Jul 2009 13:23:11 -0600 Subject: progs/glsl: finish conversion to GLEW This is a follow-on to b799af91d5ffbee1481161fec29eb4c92b161272. Remove _func function suffix and unneeded #includes. --- progs/glsl/points.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'progs/glsl/points.c') diff --git a/progs/glsl/points.c b/progs/glsl/points.c index 1b346228aa..e5ee38c449 100644 --- a/progs/glsl/points.c +++ b/progs/glsl/points.c @@ -11,10 +11,7 @@ #include #include #include -#include #include -#include -#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); } -- cgit v1.2.3