From 35dbaab0c3ef92dead66d9edd91897fc00396560 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Mon, 14 Jul 2014 04:13:15 +0200 Subject: [PATCH] Shader: Use GetShader/Programiv instead of GetObjectParameterivARB The former are core 2.0 while the latter is part of GL_ARB_shader_objects. --- src/gl-fun.h | 1 - src/shader.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gl-fun.h b/src/gl-fun.h index 48de5ec..64bdff4 100644 --- a/src/gl-fun.h +++ b/src/gl-fun.h @@ -91,7 +91,6 @@ typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, co GL_FUN(ShaderSource, PFNGLSHADERSOURCEPROC) \ GL_FUN(CompileShader, PFNGLCOMPILESHADERPROC) \ GL_FUN(AttachShader, PFNGLATTACHSHADERPROC) \ - GL_FUN(GetObjectParameterivARB, PFNGLGETOBJECTPARAMETERIVARBPROC) \ GL_FUN(GetShaderiv, PFNGLGETSHADERIVPROC) \ GL_FUN(GetShaderInfoLog, PFNGLGETSHADERINFOLOGPROC) \ /* Program */ \ diff --git a/src/shader.cpp b/src/shader.cpp index 4dbb01f..659b536 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -118,7 +118,7 @@ void Shader::init(const unsigned char *vert, int vertSize, gl.ShaderSource(vertShader, 1, (const GLchar**) &vert, (const GLint*) &vertSize); gl.CompileShader(vertShader); - gl.GetObjectParameterivARB(vertShader, GL_COMPILE_STATUS, &success); + gl.GetShaderiv(vertShader, GL_COMPILE_STATUS, &success); if (!success) { @@ -132,7 +132,7 @@ void Shader::init(const unsigned char *vert, int vertSize, gl.ShaderSource(fragShader, 1, (const GLchar**) &frag, (const GLint*) &fragSize); gl.CompileShader(fragShader); - gl.GetObjectParameterivARB(fragShader, GL_COMPILE_STATUS, &success); + gl.GetShaderiv(fragShader, GL_COMPILE_STATUS, &success); if (!success) { @@ -152,7 +152,7 @@ void Shader::init(const unsigned char *vert, int vertSize, gl.LinkProgram(program); - gl.GetObjectParameterivARB(program, GL_LINK_STATUS, &success); + gl.GetProgramiv(program, GL_LINK_STATUS, &success); if (!success) {