mirror of https://github.com/bkaradzic/bgfx
GL: Reverted scissor change.
This commit is contained in:
parent
ea613785e4
commit
4f09f317c4
|
@ -5473,8 +5473,6 @@ namespace bgfx { namespace gl
|
||||||
viewScissorRect.clear();
|
viewScissorRect.clear();
|
||||||
uint16_t discardFlags = BGFX_CLEAR_NONE;
|
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 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)
|
const bool computeSupported = (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) && s_extension[Extension::ARB_compute_shader].m_supported)
|
||||||
|| BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 31)
|
|| BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 31)
|
||||||
|
@ -5824,16 +5822,25 @@ namespace bgfx { namespace gl
|
||||||
|
|
||||||
if (UINT16_MAX == scissor)
|
if (UINT16_MAX == scissor)
|
||||||
{
|
{
|
||||||
GL_CHECK(glScissor(viewScissorRect.m_x
|
if (viewHasScissor)
|
||||||
, resolutionHeight-viewScissorRect.m_height-viewScissorRect.m_y
|
{
|
||||||
, viewScissorRect.m_width
|
GL_CHECK(glEnable(GL_SCISSOR_TEST) );
|
||||||
, viewScissorRect.m_height
|
GL_CHECK(glScissor(viewScissorRect.m_x
|
||||||
) );
|
, resolutionHeight-viewScissorRect.m_height-viewScissorRect.m_y
|
||||||
|
, viewScissorRect.m_width
|
||||||
|
, viewScissorRect.m_height
|
||||||
|
) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GL_CHECK(glDisable(GL_SCISSOR_TEST) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Rect scissorRect;
|
Rect scissorRect;
|
||||||
scissorRect.intersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]);
|
scissorRect.intersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]);
|
||||||
|
GL_CHECK(glEnable(GL_SCISSOR_TEST) );
|
||||||
GL_CHECK(glScissor(scissorRect.m_x
|
GL_CHECK(glScissor(scissorRect.m_x
|
||||||
, resolutionHeight-scissorRect.m_height-scissorRect.m_y
|
, resolutionHeight-scissorRect.m_height-scissorRect.m_y
|
||||||
, scissorRect.m_width
|
, scissorRect.m_width
|
||||||
|
|
Loading…
Reference in New Issue