mirror of
https://github.com/aap/librw.git
synced 2024-11-28 14:45:41 +00:00
Opengl: need to delete Shader, not Program
Fixes an error that is reported by various opengl debugging tools
This commit is contained in:
parent
bb7fb68531
commit
0151d72140
@ -251,13 +251,12 @@ Shader::create(const char **vsrc, const char **fsrc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fail = linkprogram(vs, fs, &program);
|
fail = linkprogram(vs, fs, &program);
|
||||||
if(fail){
|
|
||||||
glDeleteShader(fs);
|
|
||||||
glDeleteShader(vs);
|
glDeleteShader(vs);
|
||||||
|
glDeleteShader(fs);
|
||||||
|
if(fail){
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
glDeleteProgram(vs);
|
|
||||||
glDeleteProgram(fs);
|
|
||||||
|
|
||||||
Shader *sh = rwNewT(Shader, 1, MEMDUR_EVENT | ID_DRIVER); // or global?
|
Shader *sh = rwNewT(Shader, 1, MEMDUR_EVENT | ID_DRIVER); // or global?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user