hedgewars/uGearsRender.pas
changeset 10523 00ac079fa51f
parent 10443 42dadeb6e8ae
child 10526 b43d175d1577
--- a/hedgewars/uGearsRender.pas	Thu Nov 20 16:38:43 2014 +0100
+++ b/hedgewars/uGearsRender.pas	Fri Nov 21 02:03:19 2014 +0100
@@ -53,6 +53,7 @@
 uses uRender, uUtils, uVariables, uAmmos, Math, uVisualGearsList;
 
 procedure DrawRopeLinesRQ(Gear: PGear);
+var n: LongInt;
 begin
 with RopePoints do
     begin
@@ -64,24 +65,29 @@
 
 if (RopePoints.Count > 0) or (Gear^.Elasticity.QWordValue > 0) then
     begin
-    glDisable(GL_TEXTURE_2D);
+    EnableTexture(false);
     //glEnable(GL_LINE_SMOOTH);
 
-    glPushMatrix;
+    Tint($70, $70, $70, $FF);
+
+    n:= RopePoints.Count + 2;
+
+    SetVertexPointer(@RopePoints.rounded[0], n);
 
-    glTranslatef(WorldDx, WorldDy, 0);
+    openglPushMatrix();
+    openglTranslatef(WorldDx, WorldDy, 0);
 
+    glLineWidth(3.0 * cScaleFactor);
+    glDrawArrays(GL_LINE_STRIP, 0, n);
+    Tint($D8, $D8, $D8, $FF);
     glLineWidth(2.0 * cScaleFactor);
-
-    Tint($C0, $C0, $C0, $FF);
+    glDrawArrays(GL_LINE_STRIP, 0, n);
 
-    glVertexPointer(2, GL_FLOAT, 0, @RopePoints.rounded[0]);
-    glDrawArrays(GL_LINE_STRIP, 0, RopePoints.Count + 2);
     untint;
 
-    glPopMatrix;
+    openglPopMatrix();
 
-    glEnable(GL_TEXTURE_2D);
+    EnableTexture(true);
     //glDisable(GL_LINE_SMOOTH)
     end
 end;