diff options
author | Brian Paul <brianp@vmware.com> | 2009-07-17 22:00:47 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-07-17 22:00:47 -0600 |
commit | b96ae1b2c463d6d99ee0418083ef68f4027b7cd7 (patch) | |
tree | f34f89c267b940eb7408475bd0c2ff57c7fbe992 /progs/glsl/multinoise.c | |
parent | f81f57e25db18b1c69f2f8076380603340fa2cda (diff) | |
parent | cd10996d4f517c69e306eaf6dfb0654432651b3a (diff) |
Merge branch 'mesa_7_5_branch'
Conflicts:
Makefile
progs/glsl/multitex.c
src/mesa/main/enums.c
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
Diffstat (limited to 'progs/glsl/multinoise.c')
-rw-r--r-- | progs/glsl/multinoise.c | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/progs/glsl/multinoise.c b/progs/glsl/multinoise.c index 400511508e..0afe230801 100644 --- a/progs/glsl/multinoise.c +++ b/progs/glsl/multinoise.c @@ -9,10 +9,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" static const char *VertShaderText = "void main() {\n" @@ -108,10 +105,10 @@ CleanUp(void) { GLint i; - glDeleteShader_func(vertShader); + glDeleteShader(vertShader); for( i = 0; i < 4; i++ ) { - glDeleteShader_func(fragShader[ i ]); - glDeleteProgram_func(program[ i ]); + glDeleteShader(fragShader[ i ]); + glDeleteProgram(program[ i ]); } glutDestroyWindow(win); } @@ -144,7 +141,7 @@ Key(unsigned char key, int x, int y) case '2': case '3': case '4': - glUseProgram_func(program[ key - '1' ]); + glUseProgram(program[ key - '1' ]); break; case 27: CleanUp(); @@ -187,15 +184,15 @@ LoadAndCompileShader(GLuint shader, const char *text) { GLint stat; - glShaderSource_func(shader, 1, (const GLchar **) &text, NULL); + glShaderSource(shader, 1, (const GLchar **) &text, NULL); - glCompileShader_func(shader); + glCompileShader(shader); - glGetShaderiv_func(shader, GL_COMPILE_STATUS, &stat); + glGetShaderiv(shader, GL_COMPILE_STATUS, &stat); if (!stat) { GLchar log[1000]; GLsizei len; - glGetShaderInfoLog_func(shader, 1000, &len, log); + glGetShaderInfoLog(shader, 1000, &len, log); fprintf(stderr, "noise: problem compiling shader: %s\n", log); exit(1); } @@ -209,11 +206,11 @@ static void CheckLink(GLuint prog) { GLint stat; - glGetProgramiv_func(prog, GL_LINK_STATUS, &stat); + glGetProgramiv(prog, GL_LINK_STATUS, &stat); if (!stat) { GLchar log[1000]; GLsizei len; - glGetProgramInfoLog_func(prog, 1000, &len, log); + glGetProgramInfoLog(prog, 1000, &len, log); fprintf(stderr, "Linker error:\n%s\n", log); } else { @@ -234,22 +231,20 @@ Init(void) /*exit(1);*/ } - GetExtensionFuncs(); - - vertShader = glCreateShader_func(GL_VERTEX_SHADER); + vertShader = glCreateShader(GL_VERTEX_SHADER); LoadAndCompileShader(vertShader, VertShaderText); for( i = 0; i < 4; i++ ) { - fragShader[ i ] = glCreateShader_func(GL_FRAGMENT_SHADER); + fragShader[ i ] = glCreateShader(GL_FRAGMENT_SHADER); LoadAndCompileShader(fragShader[ i ], FragShaderText[ i ]); - program[ i ] = glCreateProgram_func(); - glAttachShader_func(program[ i ], fragShader[ i ]); - glAttachShader_func(program[ i ], vertShader); - glLinkProgram_func(program[ i ]); + program[ i ] = glCreateProgram(); + glAttachShader(program[ i ], fragShader[ i ]); + glAttachShader(program[ i ], vertShader); + glLinkProgram(program[ i ]); CheckLink(program[ i ]); } - glUseProgram_func(program[ 0 ]); + glUseProgram(program[ 0 ]); assert(glGetError() == 0); |