Shader: Use GetShader/Programiv instead of GetObjectParameterivARB

The former are core 2.0 while the latter is part of GL_ARB_shader_objects.
This commit is contained in:
Jonas Kulla 2014-07-14 04:13:15 +02:00
parent f7d63bafd0
commit 35dbaab0c3
2 changed files with 3 additions and 4 deletions

View File

@ -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 */ \

View File

@ -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)
{