diff options
author | Brian Paul <brianp@vmware.com> | 2009-02-09 09:22:22 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-02-09 09:22:22 -0700 |
commit | e97681c7f551a2a2a6bd5eff0f4192a870c816c0 (patch) | |
tree | dff2bf0e6d22efb92af131f64be0621ed316977c /progs/glsl/convolutions.c | |
parent | 1a46c8a062aea59de5cf55881104489db5d609e5 (diff) | |
parent | b907d4cd8fafe719b4f87d877562829548937485 (diff) |
mesa: merge gallium-0.2 into gallium-master-merge
Merge commit 'origin/gallium-0.2' into gallium-master-merge
Conflicts:
Makefile
docs/relnotes-7.4.html
docs/relnotes.html
src/mesa/drivers/dri/i965/brw_wm.h
src/mesa/main/imports.c
src/mesa/main/mtypes.h
src/mesa/main/texcompress.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_save_draw.c
Diffstat (limited to 'progs/glsl/convolutions.c')
-rw-r--r-- | progs/glsl/convolutions.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/progs/glsl/convolutions.c b/progs/glsl/convolutions.c index c5caa8ffed..ac71c68235 100644 --- a/progs/glsl/convolutions.c +++ b/progs/glsl/convolutions.c @@ -61,15 +61,15 @@ static void loadAndCompileShader(GLuint shader, const char *text) { GLint stat; - glShaderSourceARB(shader, 1, (const GLchar **) &text, NULL); + glShaderSource(shader, 1, (const GLchar **) &text, NULL); - glCompileShaderARB(shader); + glCompileShader(shader); - glGetObjectParameterivARB(shader, GL_COMPILE_STATUS, &stat); + glGetShaderiv(shader, GL_COMPILE_STATUS, &stat); if (!stat) { GLchar log[1000]; GLsizei len; - glGetInfoLogARB(shader, 1000, &len, log); + glGetShaderInfoLog(shader, 1000, &len, log); fprintf(stderr, "Problem compiling shader: %s\n", log); exit(1); } @@ -105,11 +105,11 @@ static void checkLink(GLuint prog) { GLint stat; - glGetObjectParameterivARB(prog, GL_LINK_STATUS, &stat); + glGetProgramiv(prog, GL_LINK_STATUS, &stat); if (!stat) { GLchar log[1000]; GLsizei len; - glGetInfoLogARB(prog, 1000, &len, log); + glGetProgramInfoLog(prog, 1000, &len, log); fprintf(stderr, "Linker error:\n%s\n", log); } else { @@ -200,12 +200,12 @@ static void setupConvolution() } loc = glGetUniformLocationARB(program, "KernelValue"); - glUniform4fvARB(loc, 9, vecKer); + glUniform4fv(loc, 9, vecKer); loc = glGetUniformLocationARB(program, "ScaleFactor"); - glUniform4fARB(loc, scale, scale, scale, scale); + glUniform4f(loc, scale, scale, scale, scale); loc = glGetUniformLocationARB(program, "BaseColor"); - glUniform4fARB(loc, baseColor[0], baseColor[1], - baseColor[2], baseColor[3]); + glUniform4f(loc, baseColor[0], baseColor[1], + baseColor[2], baseColor[3]); free(vecKer); free(kernel); @@ -229,10 +229,10 @@ static void createProgram(const char *vertProgFile, glAttachShader(program, fragShader); } - glLinkProgramARB(program); + glLinkProgram(program); checkLink(program); - glUseProgramObjectARB(program); + glUseProgram(program); /* assert(glIsProgram(program)); @@ -256,7 +256,7 @@ static void createProgram(const char *vertProgFile, 0.0 , -1.0 / texture.height, -1.0 / texture.width, -1.0 / texture.height }; GLuint offsetLoc = glGetUniformLocationARB(program, "Offset"); - glUniform2fvARB(offsetLoc, 9, offsets); + glUniform2fv(offsetLoc, 9, offsets); } setupConvolution(); @@ -331,6 +331,7 @@ static void init() fprintf(stderr, "Sorry, this program requires GL_ARB_shader_objects, GL_ARB_vertex_shader, and GL_ARB_fragment_shader\n"); exit(1); } + fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); |