minor cleanup - don't leak so many fragment shaders :p also fix address range for the Generate Symbol Map feature

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3379 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-06-08 18:34:24 +00:00
parent e384c91313
commit fd5a4ee71a
4 changed files with 29 additions and 10 deletions

View File

@ -27,6 +27,14 @@
struct FRAGMENTSHADER
{
FRAGMENTSHADER() : glprogid(0) { }
void Destroy()
{
if (glprogid)
{
glDeleteProgramsARB(1, &glprogid);
glprogid = 0;
}
}
GLuint glprogid; // opengl program id
#if defined(_DEBUG) || defined(DEBUGFAST)
std::string strprog;
@ -41,10 +49,9 @@ class PixelShaderCache
int frameCount;
PSCacheEntry() : frameCount(0) {}
~PSCacheEntry() {}
void Destroy() {
// printf("Destroying ps %i\n", shader.glprogid);
glDeleteProgramsARB(1, &shader.glprogid);
shader.glprogid = 0;
void Destroy()
{
shader.Destroy();
}
};