diff -r 744f1151c707 -r c243b6a8ad9a hedgewars/uRender.pas --- a/hedgewars/uRender.pas Sun Jul 06 12:19:24 2014 +0200 +++ b/hedgewars/uRender.pas Sun Jul 06 19:20:43 2014 +0200 @@ -51,6 +51,7 @@ procedure DrawLine (X0, Y0, X1, Y1, Width: Single; color: LongWord); inline; procedure DrawLine (X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte); +procedure DrawLineOnScreen (X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte); procedure DrawRect (rect: TSDL_Rect; r, g, b, a: Byte; Fill: boolean); procedure DrawHedgehog (X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real); procedure DrawScreenWidget (widget: POnScreenWidget); @@ -1093,16 +1094,24 @@ procedure DrawLine(X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte); begin + openglPushMatrix(); + openglTranslatef(WorldDx, WorldDy, 0); + + UpdateModelviewProjection; + + DrawLineOnScreen(X0, Y0, X1, Y1, Width, r, g, b, a); + + openglPopMatrix(); +end; + +procedure DrawLineOnScreen(X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte); +begin glEnable(GL_LINE_SMOOTH); EnableTexture(False); - openglPushMatrix; - openglTranslatef(WorldDx, WorldDy, 0); glLineWidth(Width); - UpdateModelviewProjection; - Tint(r, g, b, a); VertexBuffer[0].X:= X0; VertexBuffer[0].Y:= Y0; @@ -1111,9 +1120,7 @@ SetVertexPointer(@VertexBuffer[0], 2); glDrawArrays(GL_LINES, 0, 2); - untint; - - openglPopMatrix; + untint(); EnableTexture(True);