From: DeaDDooMER Date: Thu, 29 Dec 2022 01:13:32 +0000 (+0300) Subject: gl: fix invalid color cache X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=commitdiff_plain;h=4db2b2333a84fdfc62acfca2ab0801f440432f03 gl: fix invalid color cache --- diff --git a/src/game/renders/opengl/r_draw.pas b/src/game/renders/opengl/r_draw.pas index 940b672..c839936 100644 --- a/src/game/renders/opengl/r_draw.pas +++ b/src/game/renders/opengl/r_draw.pas @@ -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 diff --git a/src/game/renders/opengl/r_map.pas b/src/game/renders/opengl/r_map.pas index eb73217..1d9a0f3 100644 --- a/src/game/renders/opengl/r_map.pas +++ b/src/game/renders/opengl/r_map.pas @@ -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;