mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
#5878: Ensure surfaces are drawn before executing full-screen render commands, and when at the end of the render command list.
This commit is contained in:
parent
c0d5ba9e06
commit
bff574e04e
2 changed files with 31 additions and 2 deletions
|
@ -1410,6 +1410,10 @@ const void *RB_DrawBuffer( const void *data ) {
|
|||
|
||||
cmd = (const drawBufferCommand_t *)data;
|
||||
|
||||
// finish any 2D drawing if needed
|
||||
if(tess.numIndexes)
|
||||
RB_EndSurface();
|
||||
|
||||
if (glRefConfig.framebufferObject)
|
||||
FBO_Bind(NULL);
|
||||
|
||||
|
@ -1493,6 +1497,10 @@ const void *RB_ColorMask(const void *data)
|
|||
{
|
||||
const colorMaskCommand_t *cmd = data;
|
||||
|
||||
// finish any 2D drawing if needed
|
||||
if(tess.numIndexes)
|
||||
RB_EndSurface();
|
||||
|
||||
if (glRefConfig.framebufferObject)
|
||||
{
|
||||
// reverse color mask, so 0 0 0 0 is the default
|
||||
|
@ -1517,6 +1525,7 @@ const void *RB_ClearDepth(const void *data)
|
|||
{
|
||||
const clearDepthCommand_t *cmd = data;
|
||||
|
||||
// finish any 2D drawing if needed
|
||||
if(tess.numIndexes)
|
||||
RB_EndSurface();
|
||||
|
||||
|
@ -1648,6 +1657,10 @@ const void *RB_CapShadowMap(const void *data)
|
|||
{
|
||||
const capShadowmapCommand_t *cmd = data;
|
||||
|
||||
// finish any 2D drawing if needed
|
||||
if(tess.numIndexes)
|
||||
RB_EndSurface();
|
||||
|
||||
if (cmd->map != -1)
|
||||
{
|
||||
GL_SelectTexture(0);
|
||||
|
@ -1680,6 +1693,10 @@ const void *RB_PostProcess(const void *data)
|
|||
FBO_t *srcFbo;
|
||||
qboolean autoExposure;
|
||||
|
||||
// finish any 2D drawing if needed
|
||||
if(tess.numIndexes)
|
||||
RB_EndSurface();
|
||||
|
||||
if (!glRefConfig.framebufferObject || !r_postProcess->integer)
|
||||
{
|
||||
// do nothing
|
||||
|
@ -1812,6 +1829,10 @@ void RB_ExecuteRenderCommands( const void *data ) {
|
|||
break;
|
||||
case RC_END_OF_LIST:
|
||||
default:
|
||||
// finish any 2D drawing if needed
|
||||
if(tess.numIndexes)
|
||||
RB_EndSurface();
|
||||
|
||||
// stop rendering
|
||||
t2 = ri.Milliseconds ();
|
||||
backEnd.pc.msec = t2 - t1;
|
||||
|
|
|
@ -538,7 +538,11 @@ const void *RB_TakeScreenshotCmd( const void *data ) {
|
|||
const screenshotCommand_t *cmd;
|
||||
|
||||
cmd = (const screenshotCommand_t *)data;
|
||||
|
||||
|
||||
// finish any 2D drawing if needed
|
||||
if(tess.numIndexes)
|
||||
RB_EndSurface();
|
||||
|
||||
if (cmd->jpeg)
|
||||
RB_TakeScreenshotJPEG( cmd->x, cmd->y, cmd->width, cmd->height, cmd->fileName);
|
||||
else
|
||||
|
@ -820,7 +824,11 @@ const void *RB_TakeVideoFrameCmd( const void *data )
|
|||
size_t memcount, linelen;
|
||||
int padwidth, avipadwidth, padlen, avipadlen;
|
||||
GLint packAlign;
|
||||
|
||||
|
||||
// finish any 2D drawing if needed
|
||||
if(tess.numIndexes)
|
||||
RB_EndSurface();
|
||||
|
||||
cmd = (const videoFrameCommand_t *)data;
|
||||
|
||||
qglGetIntegerv(GL_PACK_ALIGNMENT, &packAlign);
|
||||
|
|
Loading…
Reference in a new issue