hedgewars/uStore.pas
changeset 1908 5be17e24751a
parent 1906 644f93d8f148
child 1912 c3d31fb59f0e
--- a/hedgewars/uStore.pas	Sun Mar 22 14:35:45 2009 +0000
+++ b/hedgewars/uStore.pas	Sun Mar 22 17:39:12 2009 +0000
@@ -348,7 +348,7 @@
 end;
 
 procedure DrawTexture(X, Y: LongInt; Texture: PTexture);
-var VertexBuffer, TextureBuffer: array [0..5] of TVertex2f;
+var VertexBuffer, TextureBuffer: array [0..3] of TVertex2f;
 begin
 glPushMatrix;
 glTranslatef(X, Y, 0);
@@ -363,8 +363,6 @@
 VertexBuffer[2].Y:= Texture^.h;
 VertexBuffer[3].X:= 0;
 VertexBuffer[3].Y:= Texture^.h;
-VertexBuffer[4]:= VertexBuffer[0];
-VertexBuffer[5]:= VertexBuffer[2];
 
 TextureBuffer[0].X:= 0;
 TextureBuffer[0].Y:= 0;
@@ -374,15 +372,13 @@
 TextureBuffer[2].Y:= Texture^.ry;
 TextureBuffer[3].X:= 0;
 TextureBuffer[3].Y:= Texture^.ry;
-TextureBuffer[4]:= TextureBuffer[0];
-TextureBuffer[5]:= TextureBuffer[2];
 
 glEnableClientState(GL_VERTEX_ARRAY);
 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 
 glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
 glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
-glDrawArrays(GL_TRIANGLES, 0, Length(VertexBuffer));
+glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
 
 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
 glDisableClientState(GL_VERTEX_ARRAY);