summaryrefslogtreecommitdiff
path: root/src/rend2/tr_init.c
diff options
context:
space:
mode:
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);