]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_video.c
Merge remote branch 'origin/master' into akari/irc
[xonotic/darkplaces.git] / cl_video.c
index 28be575a0a5d587888d9789e6e6ee4726a8c3186..095db75e32df2e3f236fedad451003ed10322c74 100644 (file)
@@ -521,6 +521,7 @@ void CL_DrawVideo(void)
        if (cl_video_stipple.integer || px != 0 || py != 0 || sx != vid_conwidth.integer || sy != vid_conheight.integer)
                DrawQ_Fill(0, 0, vid_conwidth.integer, vid_conheight.integer, 0, 0, 0, 1, 0);
 
+#ifndef USE_GLES2
        // enable video-only polygon stipple (of global stipple is not active)
        if (qglPolygonStipple && !scr_stipple.integer && cl_video_stipple.integer)
        {
@@ -538,13 +539,16 @@ void CL_DrawVideo(void)
                }
                qglPolygonStipple(stipple);CHECKGLERROR
        }
+#endif
 
        // draw video
        DrawQ_SuperPic(px, py, &video->cpif, sx, sy, st[0], st[1], b, b, b, 1, st[2], st[3], b, b, b, 1, st[4], st[5], b, b, b, 1, st[6], st[7], b, b, b, 1, 0);
 
+#ifndef USE_GLES2
        // disable video-only stipple
        if (qglPolygonStipple && !scr_stipple.integer && cl_video_stipple.integer)
                qglDisable(GL_POLYGON_STIPPLE);CHECKGLERROR
+#endif
 
        // VorteX: draw subtitle_text
        if (!video->subtitles || !cl_video_subtitles.integer)
@@ -613,6 +617,9 @@ static void CL_PlayVideo_f(void)
 
        Host_StartVideo();
 
+       if (COM_CheckParm("-benchmark"))
+               return;
+
        if (Cmd_Argc() < 2)
        {
                Con_Print("usage: playvideo <videoname> [custom_subtitles_file]\nplays video named video/<videoname>.dpv\nif custom subtitles file is not presented\nit tries video/<videoname>.sub");
@@ -697,4 +704,4 @@ void CL_Video_Init( void )
        Cvar_RegisterVariable(&cl_video_fadeout);
 
        R_RegisterModule( "CL_Video", cl_video_start, cl_video_shutdown, cl_video_newmap, NULL, NULL );
-}
\ No newline at end of file
+}