summaryrefslogtreecommitdiff
path: root/src/rend2/tr_init.c
diff options
context:
space:
mode:
authorSmileTheory <SmileTheory@gmail.com>2013-02-12 20:53:59 -0800
committerTim Angus <tim@ngus.net>2013-02-16 21:54:34 +0000
commitc1ad10c57be23f89f658a13729e4349b400a8734 (patch)
tree2630eea189f2615c746c5d9d9df3fdab74a08cbb /src/rend2/tr_init.c
parentfbfe8effb146823d317870d60068bf71cfb85da8 (diff)
#5878: Ensure surfaces are drawn before executing full-screen render commands, and when at the end of the render command list.
Diffstat (limited to 'src/rend2/tr_init.c')
-rw-r--r--src/rend2/tr_init.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/rend2/tr_init.c b/src/rend2/tr_init.c
index 99f4ecaf..7228d01b 100644
--- a/src/rend2/tr_init.c
+++ b/src/rend2/tr_init.c
@@ -467,7 +467,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
@@ -749,7 +753,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);