Only adjust view rect if it uses BackbufferRatio
This commit is contained in:
parent
379fc707ff
commit
16fd75a828
12
src/bgfx.cpp
12
src/bgfx.cpp
@ -1413,7 +1413,6 @@ namespace bgfx
|
|||||||
viewRemap[m_viewRemap[ii] ] = ViewId(ii);
|
viewRemap[m_viewRemap[ii] ] = ViewId(ii);
|
||||||
|
|
||||||
View& view = m_view[ii];
|
View& view = m_view[ii];
|
||||||
Rect rect(0, 0, uint16_t(m_resolution.width), uint16_t(m_resolution.height) );
|
|
||||||
|
|
||||||
if (isValid(view.m_fbh) )
|
if (isValid(view.m_fbh) )
|
||||||
{
|
{
|
||||||
@ -1425,14 +1424,9 @@ namespace bgfx
|
|||||||
|
|
||||||
if (BackbufferRatio::Count != bbRatio)
|
if (BackbufferRatio::Count != bbRatio)
|
||||||
{
|
{
|
||||||
|
Rect rect(0, 0, uint16_t(m_resolution.width), uint16_t(m_resolution.height) );
|
||||||
|
|
||||||
getTextureSizeFromRatio(bbRatio, rect.m_width, rect.m_height);
|
getTextureSizeFromRatio(bbRatio, rect.m_width, rect.m_height);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rect.m_width = fbr.m_width;
|
|
||||||
rect.m_height = fbr.m_height;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
view.m_rect.intersect(rect);
|
view.m_rect.intersect(rect);
|
||||||
|
|
||||||
@ -1441,6 +1435,8 @@ namespace bgfx
|
|||||||
view.m_scissor.intersect(rect);
|
view.m_scissor.intersect(rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (uint32_t ii = 0, num = m_numRenderItems; ii < num; ++ii)
|
for (uint32_t ii = 0, num = m_numRenderItems; ii < num; ++ii)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user