--- a/hedgewars/uMisc.pas Sat Jan 26 10:21:43 2008 +0000
+++ b/hedgewars/uMisc.pas Sat Jan 26 10:55:34 2008 +0000
@@ -117,6 +117,7 @@
procedure SendStat(sit: TStatInfoType; s: shortstring);
function Str2PChar(const s: shortstring): PChar;
function Surface2Tex(surf: PSDL_Surface): PTexture;
+procedure FreeTexture(tex: PTexture);
var CursorPoint: TPoint;
TargetPoint: TPoint = (X: NoPointX; Y: 0);
@@ -286,6 +287,11 @@
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR)
end;
+procedure FreeTexture(tex: PTexture);
+begin
+glDeleteTextures(1, @tex^.id);
+dispose(tex)
+end;
var i: LongInt;
{$ENDIF}