mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-04-24 16:40:17 +00:00
Fix shader destructor
This commit is contained in:
parent
55a5b0569c
commit
b46787f36d
1 changed files with 10 additions and 7 deletions
|
@ -654,13 +654,16 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char *
|
|||
|
||||
FShader::~FShader()
|
||||
{
|
||||
/*
|
||||
glDeleteProgram(hShader);
|
||||
if (hVertProg != 0)
|
||||
glDeleteShader(hVertProg);
|
||||
if (hFragProg != 0)
|
||||
glDeleteShader(hFragProg);
|
||||
*/
|
||||
std::map<uint32_t, ShaderVariantData*>::iterator it = variants.begin();
|
||||
|
||||
while (it != variants.end())
|
||||
{
|
||||
glDeleteProgram(it->second->hShader);
|
||||
if (it->second->hVertProg != 0)
|
||||
glDeleteShader(it->second->hVertProg);
|
||||
if (it->second->hFragProg != 0)
|
||||
glDeleteShader(it->second->hFragProg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue