mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-10-25 18:25:29 +00:00
Allow negative x/y in bgfx::setViewRect. (#3848)
This commit is contained in:
@@ -6156,10 +6156,11 @@ namespace bgfx { namespace d3d11
|
||||
}
|
||||
|
||||
viewState.m_rect = _render->m_view[view].m_rect;
|
||||
const Rect& clippedRect = _render->m_view[view].m_clippedRect;
|
||||
|
||||
const Rect& scissorRect = _render->m_view[view].m_scissor;
|
||||
viewHasScissor = !scissorRect.isZero();
|
||||
viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect;
|
||||
viewScissorRect = viewHasScissor ? scissorRect : clippedRect;
|
||||
|
||||
D3D11_VIEWPORT vp;
|
||||
vp.TopLeftX = viewState.m_rect.m_x;
|
||||
@@ -6173,7 +6174,7 @@ namespace bgfx { namespace d3d11
|
||||
|
||||
if (BGFX_CLEAR_NONE != (clr.m_flags & BGFX_CLEAR_MASK) )
|
||||
{
|
||||
clearQuad(_clearQuad, viewState.m_rect, clr, _render->m_colorPalette);
|
||||
clearQuad(_clearQuad, clippedRect, clr, _render->m_colorPalette);
|
||||
prim = s_primInfo[Topology::Count]; // Force primitive type update after clear quad.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user