diff options
Diffstat (limited to 'progs/glsl/mandelbrot.c')
-rw-r--r-- | progs/glsl/mandelbrot.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/progs/glsl/mandelbrot.c b/progs/glsl/mandelbrot.c index eeea4eb52ae..38dffc3e741 100644 --- a/progs/glsl/mandelbrot.c +++ b/progs/glsl/mandelbrot.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" @@ -57,9 +54,9 @@ Redisplay(void) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* set interactive uniform parameters */ - glUniform1fv_func(uZoom, 1, &zoom); - glUniform1fv_func(uXcenter, 1, &xCenter); - glUniform1fv_func(uYcenter, 1, &yCenter); + glUniform1fv(uZoom, 1, &zoom); + glUniform1fv(uXcenter, 1, &xCenter); + glUniform1fv(uYcenter, 1, &yCenter); glPushMatrix(); glRotatef(xRot, 1.0f, 0.0f, 0.0f); @@ -95,9 +92,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); } @@ -156,19 +153,17 @@ Init(void) if (!ShadersSupported()) exit(1); - GetExtensionFuncs(); - vertShader = CompileShaderFile(GL_VERTEX_SHADER, VertProgFile); fragShader = CompileShaderFile(GL_FRAGMENT_SHADER, FragProgFile); program = LinkShaders(vertShader, fragShader); - glUseProgram_func(program); + glUseProgram(program); InitUniforms(program, Uniforms); - uZoom = glGetUniformLocation_func(program, "Zoom"); - uXcenter = glGetUniformLocation_func(program, "Xcenter"); - uYcenter = glGetUniformLocation_func(program, "Ycenter"); + uZoom = glGetUniformLocation(program, "Zoom"); + uXcenter = glGetUniformLocation(program, "Xcenter"); + uYcenter = glGetUniformLocation(program, "Ycenter"); assert(glGetError() == 0); @@ -176,9 +171,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)); glColor3f(1, 0, 0); } |