Skip to content

Commit e01f946

Browse files
authored
disable scissor test (#248)
* disable scissor test * move scissor test disable * use gl_f functions
1 parent 4df21fc commit e01f946

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/glinject.c

Lines changed: 7 additions & 0 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 = gl_f.IsEnabled(GL_SCISSOR_TEST);
793+
if (scissorEnabled) {
794+
gl_f.Disable(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+
gl_f.Enable(GL_SCISSOR_TEST);
818+
}
812819
}
813820

814821
static bool gl_shtex_init()

0 commit comments

Comments
 (0)