Merge pull request #5536 from fr500/master

move scissor test to nuklear driver exclusively
This commit is contained in:
Andrés 2017-10-11 22:49:12 -05:00 committed by GitHub
commit f1453b6696
2 changed files with 3 additions and 2 deletions

View File

@ -196,10 +196,12 @@ void nk_common_device_draw(struct nk_device *dev,
glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &last_vao);
glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &last_ebo);
glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vbo);
glEnable(GL_SCISSOR_TEST);
#endif
menu_display_blend_begin();
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
glActiveTexture(GL_TEXTURE0);
#endif
@ -288,6 +290,7 @@ void nk_common_device_draw(struct nk_device *dev,
glBindBuffer(GL_ARRAY_BUFFER, (GLuint)last_vbo);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, (GLuint)last_ebo);
glBindVertexArray((GLuint)last_vao);
glDisable(GL_SCISSOR_TEST);
#endif
menu_display_blend_end();

View File

@ -83,7 +83,6 @@ static void menu_display_gl_blend_begin(void)
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_SCISSOR_TEST);
shader_info.data = NULL;
shader_info.idx = VIDEO_SHADER_STOCK_BLEND;
@ -95,7 +94,6 @@ static void menu_display_gl_blend_begin(void)
static void menu_display_gl_blend_end(void)
{
glDisable(GL_BLEND);
glDisable(GL_SCISSOR_TEST);
}
static void menu_display_gl_viewport(void *data)