mirror of https://github.com/aap/librw.git
Merge pull request #67 from phire/delete_the_right_thing
Opengl: need to delete Shader, not Program
This commit is contained in:
commit
81ed9cb75e
|
@ -251,13 +251,12 @@ Shader::create(const char **vsrc, const char **fsrc)
|
|||
}
|
||||
|
||||
fail = linkprogram(vs, fs, &program);
|
||||
|
||||
glDeleteShader(vs);
|
||||
glDeleteShader(fs);
|
||||
if(fail){
|
||||
glDeleteShader(fs);
|
||||
glDeleteShader(vs);
|
||||
return nil;
|
||||
}
|
||||
glDeleteProgram(vs);
|
||||
glDeleteProgram(fs);
|
||||
|
||||
Shader *sh = rwNewT(Shader, 1, MEMDUR_EVENT | ID_DRIVER); // or global?
|
||||
|
||||
|
|
Loading…
Reference in New Issue