Fix #612 (passing a program object to glDeleteShader via pglDeleteObjectARB)
This was SVN commit r8344.
This commit is contained in:
parent
c1967848d2
commit
7b59550cc3
@ -110,8 +110,11 @@ FUNC(void, glGetFramebufferAttachmentParameterivEXT, (GLenum target, GLenum atta
|
||||
FUNC(void, glGenerateMipmapEXT, (GLenum target))
|
||||
|
||||
// GL_ARB_shader_objects
|
||||
// (NOTE: Many of these have "Object" in their ARB names, but "Program" or "Shader" in their core names.)
|
||||
FUNC2(void, glDeleteObjectARB, glDeleteShader, "2.0", (GLhandleARB obj))
|
||||
// (NOTE: Many of these have "Object" in their ARB names, but "Program" or "Shader" in their core names.
|
||||
// When both Program and Shader versions exist, we use FUNC3 here and the engine must call the specific
|
||||
// core name instead of the generic ARB name.)
|
||||
FUNC3(void, glDeleteObjectARB, glDeleteShader, "2.0", (GLhandleARB obj))
|
||||
FUNC3(void, glDeleteObjectARB, glDeleteProgram, "2.0", (GLhandleARB obj))
|
||||
// FUNC2(GLhandleARB, glGetHandleARB, glGetHandle, "2.0", (GLenum pname))
|
||||
// there is no analog to the ARB function in GL 2.0 (the functionality is probably moved into glGetIntegerv(GL_CURRENT_PROGRAM))
|
||||
// so we can't represent it in this FUNC2 system, so just pretend it doesn't exist
|
||||
|
@ -191,7 +191,7 @@ static LibError Ogl_Shader_reload(Ogl_Shader* shdr, const PIVFS& vfs, const VfsP
|
||||
return INFO::OK;
|
||||
|
||||
fail_shadercreated:
|
||||
pglDeleteObjectARB(shdr->id);
|
||||
pglDeleteShader(shdr->id);
|
||||
shdr->id = 0;
|
||||
return err;
|
||||
}
|
||||
@ -203,7 +203,7 @@ static void Ogl_Shader_dtor(Ogl_Shader* shdr)
|
||||
// shdr->id is 0 when reload has failed
|
||||
if (shdr->id)
|
||||
{
|
||||
pglDeleteObjectARB(shdr->id);
|
||||
pglDeleteShader(shdr->id);
|
||||
shdr->id = 0;
|
||||
}
|
||||
}
|
||||
@ -427,7 +427,7 @@ static void Ogl_Program_dtor(Ogl_Program* p)
|
||||
{
|
||||
if (p->id)
|
||||
{
|
||||
pglDeleteObjectARB(p->id);
|
||||
pglDeleteProgram(p->id);
|
||||
p->id = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user