GL: Scissor always enabled.
This commit is contained in:
parent
c4fa56092b
commit
6e2ec8f7a1
@ -515,6 +515,7 @@ GL_IMPORT_OES__(true, PFNGLBINDVERTEXARRAYPROC, glBindVertexA
|
||||
GL_IMPORT_OES__(true, PFNGLDELETEVERTEXARRAYSPROC, glDeleteVertexArrays);
|
||||
GL_IMPORT_OES__(true, PFNGLGENVERTEXARRAYSPROC, glGenVertexArrays);
|
||||
|
||||
GL_IMPORT_____x(true, PFNGLCLIPCONTROLPROC, glClipControl);
|
||||
GL_IMPORT_____x(true, PFNGLENABLEIPROC, glEnablei);
|
||||
GL_IMPORT_____x(true, PFNGLDISABLEIPROC, glDisablei);
|
||||
GL_IMPORT_____x(true, PFNGLBLENDEQUATIONIPROC, glBlendEquationi);
|
||||
|
@ -5473,6 +5473,8 @@ namespace bgfx { namespace gl
|
||||
viewScissorRect.clear();
|
||||
uint16_t discardFlags = BGFX_CLEAR_NONE;
|
||||
|
||||
GL_CHECK(glEnable(GL_SCISSOR_TEST) );
|
||||
|
||||
const bool blendIndependentSupported = s_extension[Extension::ARB_draw_buffers_blend].m_supported;
|
||||
const bool computeSupported = (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) && s_extension[Extension::ARB_compute_shader].m_supported)
|
||||
|| BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 31)
|
||||
@ -5822,9 +5824,6 @@ namespace bgfx { namespace gl
|
||||
|
||||
if (UINT16_MAX == scissor)
|
||||
{
|
||||
if (viewHasScissor)
|
||||
{
|
||||
GL_CHECK(glEnable(GL_SCISSOR_TEST) );
|
||||
GL_CHECK(glScissor(viewScissorRect.m_x
|
||||
, resolutionHeight-viewScissorRect.m_height-viewScissorRect.m_y
|
||||
, viewScissorRect.m_width
|
||||
@ -5832,15 +5831,9 @@ namespace bgfx { namespace gl
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL_CHECK(glDisable(GL_SCISSOR_TEST) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Rect scissorRect;
|
||||
scissorRect.intersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]);
|
||||
GL_CHECK(glEnable(GL_SCISSOR_TEST) );
|
||||
GL_CHECK(glScissor(scissorRect.m_x
|
||||
, resolutionHeight-scissorRect.m_height-scissorRect.m_y
|
||||
, scissorRect.m_width
|
||||
|
Loading…
Reference in New Issue
Block a user