Skip to content

Commit

Permalink
OpenGL2: Fix updating the loading screen with r_cubeMapping 1
Browse files Browse the repository at this point in the history
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: a81df34
"OpenGL2: Fix border for cg_viewsize using HDR/FB-MSAA w/postProcess"
  • Loading branch information
zturtleman committed Nov 23, 2023
1 parent 03bc4eb commit 972635e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/renderergl2/tr_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 972635e

Please sign in to comment.