diff -r 99f05a01a6a3 -r ece7b87f1334 hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Thu Sep 10 15:22:34 2009 +0000 +++ b/hedgewars/uMisc.pas Thu Sep 10 15:29:28 2009 +0000 @@ -360,7 +360,7 @@ Surface2Tex^.w:= surf^.w; Surface2Tex^.h:= surf^.h; -if (surf^.format^.BytesPerPixel = 3) then +if (surf^.format^.BytesPerPixel = 3) then begin modeIntFormat:= GL_RGB; modeFormat:= modeIntFormat; @@ -392,7 +392,7 @@ Surface2Tex^.rx:= Surf^.w / tw; Surface2Tex^.ry:= Surf^.h / th; - + GetMem(tmpp, tw * th * surf^.format^.BytesPerPixel); if surf^.format^.BytesPerPixel = 4 then @@ -454,9 +454,9 @@ // legacy resizing function // gluScaleImage(mode, Surf^.w, Surf^.h, GL_UNSIGNED_BYTE, Surf^.pixels, tw, th, GL_UNSIGNED_BYTE, tmpp); - + glTexImage2D(GL_TEXTURE_2D, 0, modeIntFormat, tw, th, 0, modeFormat, GL_UNSIGNED_BYTE, tmpp); - + FreeMem(tmpp, tw * th * surf^.format^.BytesPerPixel) end else begin