From: DeaDDooMER Date: Sat, 18 Feb 2023 00:47:00 +0000 (+0300) Subject: gl: fix holmes scale and map offset X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=31b1ad1d8b34f7f157c18618f4eaf2bdbd11d305;p=d2df-sdl.git gl: fix holmes scale and map offset --- diff --git a/src/game/renders/opengl/r_holmes.pas b/src/game/renders/opengl/r_holmes.pas index f83fa6d..8c4bfdc 100644 --- a/src/game/renders/opengl/r_holmes.pas +++ b/src/game/renders/opengl/r_holmes.pas @@ -808,6 +808,11 @@ var begin if (gPlayer1 = nil) then exit; + glPushMatrix; + (* hack: scale and translate must be handled by hlmContext.glSetScaleTrans, but it dont work for some reason *) + glScalef(g_dbg_scale, g_dbg_scale, 1.0); + glTranslatef(-vpx, -vpy, 0); + if (hlmContext = nil) then hlmContext := r_fui_gfx_gl.TGxContext.Create(); gxSetContext(hlmContext); @@ -819,7 +824,7 @@ begin glScalef(g_dbg_scale, g_dbg_scale, 1.0); glTranslatef(-vpx, -vpy, 0); } - hlmContext.glSetScaleTrans(g_dbg_scale, -vpx, -vpy); +// hlmContext.glSetScaleTrans(g_dbg_scale, -vpx, -vpy); // uncomment when fix it glEnable(GL_SCISSOR_TEST); glScissor(0, gScreenHeight-gPlayerScreenSize.Y-1, gPlayerScreenSize.X, gPlayerScreenSize.Y); @@ -880,6 +885,8 @@ begin gxSetContext(nil); end; + glPopMatrix; + if showMapCurPos then begin s := Format('mappos:(%d,%d)', [pmsCurMapX, pmsCurMapY]);