From 68ad9647df5a43e10fe821d619d885462b394a24 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 22 Nov 2023 19:38:50 -0600 Subject: [PATCH] OpenGL2: Fix updating the loading screen with r_cubeMapping 1 Generating cubemaps set backEnd.viewParms.isMirror = qtrue while the loading screen said 'loading... maps/q3dm1.bsp' and it just stayed like that until done loading (no additional messages or item icons) because all 2D drawing was culled due to flipped culling for isMirror. This was noticed because a recent commit fixed RB_ShowImages() to be drawn to the screen instead of draw into renderFbo and never blit to the screen. Now the loading screen draws over it as expected. Mentioned commit: a81df34905fab89ad478237c269fc26bb1262489 "OpenGL2: Fix border for cg_viewsize using HDR/FB-MSAA w/postProcess" --- code/renderergl2/tr_backend.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/renderergl2/tr_backend.c b/code/renderergl2/tr_backend.c index 6b61217b51..7387101bdf 100644 --- a/code/renderergl2/tr_backend.c +++ b/code/renderergl2/tr_backend.c @@ -1169,6 +1169,13 @@ const void *RB_DrawSurfs( const void *data ) { qglGenerateTextureMipmapEXT(cubemap->image->texnum, GL_TEXTURE_CUBE_MAP); } + // FIXME? backEnd.viewParms doesn't get properly initialized for 2D drawing. + // r_cubeMapping 1 generates cubemaps with R_RenderCubemapSide() + // and sets isMirror = qtrue. Clear it here to prevent it from leaking + // to 2D drawing and causing the loading screen to be culled. + backEnd.viewParms.isMirror = qfalse; + backEnd.viewParms.flags = 0; + return (const void *)(cmd + 1); }