DEADSOFTWARE

gl: fix invalid color cache
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Thu, 29 Dec 2022 01:13:32 +0000 (04:13 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 9 Jun 2023 09:08:50 +0000 (12:08 +0300)
src/game/renders/opengl/r_draw.pas
src/game/renders/opengl/r_map.pas

index 940b6728d2cc9827204912fcff593d848a6b0afd..c839936087a0754aa00405d235b32c67087422a3 100644 (file)
@@ -42,6 +42,7 @@ interface
   procedure r_Draw_GetRect (out l, t, r, b: Integer);
 
   procedure r_Draw_EnableTexture2D (enable: Boolean);
+  procedure r_Draw_SetColor (r, g, b, a: Byte);
 
 implementation
 
index eb7321773680c186524226d53fe4553c0c88f757..1d9a0f3caed772cdf073b79d83aa559b0c968435 100644 (file)
@@ -1125,6 +1125,7 @@ implementation
       glEnable(GL_BLEND);
       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
+      r_Draw_SetColor(255, 255, 255, 255);
       glBegin(GL_POINTS);
         for i := 0 to High(Particles) do
         begin
@@ -1137,6 +1138,7 @@ implementation
           end;
         end;
       glEnd;
+      r_Draw_SetColor(0, 0, 0, 255);
 
       glDisable(GL_BLEND);
     end;