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:
parent
f7d63bafd0
commit
35dbaab0c3
|
@ -91,7 +91,6 @@ typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, co
|
||||||
GL_FUN(ShaderSource, PFNGLSHADERSOURCEPROC) \
|
GL_FUN(ShaderSource, PFNGLSHADERSOURCEPROC) \
|
||||||
GL_FUN(CompileShader, PFNGLCOMPILESHADERPROC) \
|
GL_FUN(CompileShader, PFNGLCOMPILESHADERPROC) \
|
||||||
GL_FUN(AttachShader, PFNGLATTACHSHADERPROC) \
|
GL_FUN(AttachShader, PFNGLATTACHSHADERPROC) \
|
||||||
GL_FUN(GetObjectParameterivARB, PFNGLGETOBJECTPARAMETERIVARBPROC) \
|
|
||||||
GL_FUN(GetShaderiv, PFNGLGETSHADERIVPROC) \
|
GL_FUN(GetShaderiv, PFNGLGETSHADERIVPROC) \
|
||||||
GL_FUN(GetShaderInfoLog, PFNGLGETSHADERINFOLOGPROC) \
|
GL_FUN(GetShaderInfoLog, PFNGLGETSHADERINFOLOGPROC) \
|
||||||
/* Program */ \
|
/* Program */ \
|
||||||
|
|
|
@ -118,7 +118,7 @@ void Shader::init(const unsigned char *vert, int vertSize,
|
||||||
gl.ShaderSource(vertShader, 1, (const GLchar**) &vert, (const GLint*) &vertSize);
|
gl.ShaderSource(vertShader, 1, (const GLchar**) &vert, (const GLint*) &vertSize);
|
||||||
gl.CompileShader(vertShader);
|
gl.CompileShader(vertShader);
|
||||||
|
|
||||||
gl.GetObjectParameterivARB(vertShader, GL_COMPILE_STATUS, &success);
|
gl.GetShaderiv(vertShader, GL_COMPILE_STATUS, &success);
|
||||||
|
|
||||||
if (!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.ShaderSource(fragShader, 1, (const GLchar**) &frag, (const GLint*) &fragSize);
|
||||||
gl.CompileShader(fragShader);
|
gl.CompileShader(fragShader);
|
||||||
|
|
||||||
gl.GetObjectParameterivARB(fragShader, GL_COMPILE_STATUS, &success);
|
gl.GetShaderiv(fragShader, GL_COMPILE_STATUS, &success);
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
|
@ -152,7 +152,7 @@ void Shader::init(const unsigned char *vert, int vertSize,
|
||||||
|
|
||||||
gl.LinkProgram(program);
|
gl.LinkProgram(program);
|
||||||
|
|
||||||
gl.GetObjectParameterivARB(program, GL_LINK_STATUS, &success);
|
gl.GetProgramiv(program, GL_LINK_STATUS, &success);
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue