Skip to content

Commit 612d009

Browse files
committed
move scissor test disable
1 parent dc25ebf commit 612d009

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/glinject.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,10 @@ static void gl_copy_backbuffer(GLuint dst)
789789

790790
static void gl_shtex_capture()
791791
{
792+
bool scissorEnabled = glIsEnabled(GL_SCISSOR_TEST);
793+
if (scissorEnabled) {
794+
glDisable(GL_SCISSOR_TEST);
795+
}
792796
GLboolean last_srgb;
793797
GLint last_read_fbo;
794798
GLint last_draw_fbo;
@@ -809,6 +813,9 @@ static void gl_shtex_capture()
809813
} else {
810814
gl_f.Disable(GL_FRAMEBUFFER_SRGB);
811815
}
816+
if (scissorEnabled) {
817+
glEnable(GL_SCISSOR_TEST);
818+
}
812819
}
813820

814821
static bool gl_shtex_init()
@@ -967,8 +974,6 @@ static bool gl_init(void *display, void *surface)
967974

968975
static void gl_capture(void *display, void *surface)
969976
{
970-
glDisable(GL_SCISSOR_TEST);
971-
972977
capture_update_socket();
973978

974979
if (capture_should_stop()) {

0 commit comments

Comments
 (0)