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/bitmap.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/bitmap.c')
-rw-r--r-- | progs/glsl/bitmap.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/progs/glsl/bitmap.c b/progs/glsl/bitmap.c index 08fac15c89d..8b1853d9ab2 100644 --- a/progs/glsl/bitmap.c +++ b/progs/glsl/bitmap.c @@ -10,10 +10,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" @@ -79,11 +76,11 @@ Redisplay(void) BitmapText("-X"); } else { - glUseProgram_func(Program); + glUseProgram(Program); /* vertex positions (deltas) depend on texture size and window size */ if (uScale != -1) { - glUniform2f_func(uScale, + glUniform2f(uScale, 2.0 * TEX_WIDTH / WinWidth, 2.0 * TEX_HEIGHT / WinHeight); } @@ -106,7 +103,7 @@ Redisplay(void) glTexCoord2f(0, 1); glVertex3fv(nx); glEnd(); - glUseProgram_func(0); + glUseProgram(0); } glPopMatrix(); @@ -161,9 +158,9 @@ Key(unsigned char key, int x, int y) printf("Using billboard texture\n"); break; case 27: - glDeleteShader_func(FragShader); - glDeleteShader_func(VertShader); - glDeleteProgram_func(Program); + glDeleteShader(FragShader); + glDeleteShader(VertShader); + glDeleteProgram(Program); glutDestroyWindow(Win); exit(0); } @@ -278,21 +275,19 @@ 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); - uScale = glGetUniformLocation_func(Program, "scale"); - uTex = glGetUniformLocation_func(Program, "tex2d"); + uScale = glGetUniformLocation(Program, "scale"); + uTex = glGetUniformLocation(Program, "tex2d"); if (uTex != -1) { - glUniform1i_func(uTex, 0); /* tex unit 0 */ + glUniform1i(uTex, 0); /* tex unit 0 */ } - glUseProgram_func(0); + glUseProgram(0); glClearColor(0.3f, 0.3f, 0.3f, 0.0f); glEnable(GL_DEPTH_TEST); |