This commit is contained in:
Ryan Houdek
2011-12-02 18:46:07 -06:00
committed by Sonicadvance1
parent 411357b54a
commit 7a4c080c70
4 changed files with 33 additions and 9 deletions

View File

@ -29,16 +29,21 @@ namespace OGL
struct FRAGMENTSHADER
{
FRAGMENTSHADER() : glprogid(0) { }
FRAGMENTSHADER() : glprogid(0), bGLSL(0) { }
void Destroy()
{
if (glprogid)
{
glDeleteProgramsARB(1, &glprogid);
if(bGLSL)
glDeleteShader(glprogid);
else
glDeleteProgramsARB(1, &glprogid);
glprogid = 0;
}
}
GLuint glprogid; // opengl program id
bool bGLSL;
std::string strprog;
};