move this in hw_main

This commit is contained in:
Alug committed 2024-08-15 15:19:11 +02:00
1 parent b909fe8ea9
commit b47f5ab235
2 files changed
+7 -6

No files matched your search

-1
View File
@@ -573,7 +573,6 @@ GLMapTexture_t *HWR_GetTexture(INT32 tex, boolean noencore)
// If hardware does not have the texture, then call pfnSetTexture to upload it
if (!grtex->mipmap.downloaded)
HWD.pfnSetTexture(&grtex->mipmap);
HWR_SetCurrentTexture(&grtex->mipmap);
// The system-memory data can be purged now.
+7 -5
View File
@@ -5523,16 +5523,14 @@ static void HWR_RenderViewpoint(gl_portal_t *rootportal, const float fpov, playe
HWD.pfnSetTransform(&atransform);
validcount++;
if (cv_grbatching.value)
HWR_StartBatching();
HWR_AddPrecipitationSprites();
ps_numbspcalls.value.i = 0;
ps_numpolyobjects.value.i = 0;
PS_START_TIMING(ps_bsptime);
if (cv_grbatching.value)
HWR_StartBatching();
if (!rootportal && portallist.base && !skybox)// if portals have been drawn in the main view, then render skywalls differently
gr_collect_skywalls = true;
@@ -5542,11 +5540,15 @@ static void HWR_RenderViewpoint(gl_portal_t *rootportal, const float fpov, playe
if (gr_portal != GRPORTAL_OFF) // if we already haven't hit the recursion limit or we already ended our portal shenanigans
gr_portal = GRPORTAL_INSIDE; // TURN IT OFF
// Recursively "render" the BSP tree.
HWR_RenderBSPNode((INT32)numnodes-1);
// woo we back
gr_portal = oldgl_portal_state;
HWR_AddPrecipitationSprites();
PS_STOP_TIMING(ps_bsptime);
if (cv_grbatching.value)