dont need to reinit those gl vars

This commit is contained in:
Alug committed 2025-08-12 20:27:22 +02:00
1 parent b810618f18
commit dfdc24f72f
1 file changed
+11 -23
+11 -23
View File
@@ -552,9 +552,9 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool
INT32 i;
float height; // constant y for all points on the convex flat polygon
float flatxref, flatyref = 0.0f;
float fflatsize = 64.0f;
INT32 flatflag = 63;
static float flatxref = 0.0f, flatyref = 0.0f;
static float fflatsize = 64.0f;
static INT32 flatflag = 63;
size_t len;
float tempxsow, tempytow;
@@ -1034,10 +1034,10 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
float diff;
fixed_t v1x = FloatToFixed(wallVerts[0].x);
fixed_t v1y = FloatToFixed(wallVerts[0].z);
fixed_t v2x = FloatToFixed(wallVerts[1].x);
fixed_t v2y = FloatToFixed(wallVerts[1].z);
const fixed_t v1x = FloatToFixed(wallVerts[0].x);
const fixed_t v1y = FloatToFixed(wallVerts[0].z);
const fixed_t v2x = FloatToFixed(wallVerts[1].x);
const fixed_t v2y = FloatToFixed(wallVerts[1].z);
const UINT8 alpha = Surf->PolyColor.s.alpha;
FUINT lightnum = HWR_CalcWallLight(sector->lightlevel, gl_curline, NULL);
@@ -5334,19 +5334,14 @@ static void HWR_DrawSkyBackground(void)
{
FTransform dometransform;
if (drewsky)
return;
if (HWR_IsWireframeMode())
if (drewsky || HWR_IsWireframeMode())
return;
GL_SetBlend(PF_Translucent|PF_NoDepthTest|PF_Modulated);
memcpy(&dometransform, &atransform, sizeof(FTransform));
dometransform.x = 0.0;
dometransform.y = 0.0;
dometransform.z = 0.0;
dometransform.x = dometransform.y = dometransform.z = 0.0;
//04/01/2000: Hurdler: added for T&L
// It should replace all other gl_viewxxx when finished
@@ -5381,7 +5376,6 @@ static inline void HWR_ClearView(void)
GL_ClearBuffer(false, true, true, NULL);
}
// -----------------+
// HWR_SetViewSize : set projection and scaling values
// -----------------+
@@ -5612,7 +5606,7 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, player_t *player, int stencil_
drewsky = false;
HWR_DrawSkyBackground();
HWR_SetStencilState(HWR_STENCIL_NORMAL, 0);
GL_ClearBuffer(false, false, true, 0);// clear skywall markings from the stencil buffer
GL_ClearBuffer(false, false, true, NULL);// clear skywall markings from the stencil buffer
HWR_SetTransform(fpov);// restore transform
}
}
@@ -5731,13 +5725,7 @@ void HWR_RenderPlayerView(void)
// Clear the color buffer, stops HOMs. Also seems to fix the skybox issue on Intel GPUs.
if (viewssnum == 0) // Only do it if it's the first screen being rendered
{
FRGBAFloat ClearColor;
ClearColor.red = 0.0f;
ClearColor.green = 0.0f;
ClearColor.blue = 0.0f;
ClearColor.alpha = 1.0f;
static FRGBAFloat ClearColor = {0.0f, 0.0f, 0.0f, 1.0f};
GL_ClearBuffer(true, false, false, &ClearColor);
}