fix leaky textures & vbos

This commit is contained in:
Chris Forbes
2011-05-05 19:16:45 +12:00
parent 75588b050e
commit a52d7fb496
4 changed files with 14 additions and 25 deletions

View File

@@ -40,6 +40,9 @@ namespace OpenRA.Renderer.Glsl
SetData(bitmap);
}
void FinalizeInner() { UpdateMemoryUsage(0); Gl.glDeleteTextures(1, ref texture); }
~Texture() { Game.RunAfterTick(FinalizeInner); }
void PrepareTexture()
{
GraphicsDevice.CheckGlError();