Cleanup.
This commit is contained in:
parent
f6d433f4ff
commit
f7130318c0
@ -2129,9 +2129,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY);
|
||||
|
||||
if ( getBufferWidth() != _resolution.m_width
|
||||
|| getBufferHeight() != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
{
|
||||
flags &= ~BGFX_RESET_FORCE;
|
||||
|
||||
@ -2140,12 +2140,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
&& (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (flags&BGFX_RESET_MSAA_MASK)
|
||||
;
|
||||
|
||||
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
|
||||
m_textVideoMem.clear();
|
||||
|
||||
m_resolution = _resolution;
|
||||
m_resolution.m_flags = flags;
|
||||
|
||||
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
|
||||
m_textVideoMem.clear();
|
||||
|
||||
setBufferSize(_resolution.m_width, _resolution.m_height);
|
||||
|
||||
preReset();
|
||||
|
@ -1642,17 +1642,22 @@ data.NumQualityLevels = 0;
|
||||
m_maxAnisotropy = 1;
|
||||
}
|
||||
|
||||
if ( (uint32_t)m_scd.BufferDesc.Width != _resolution.m_width
|
||||
|| (uint32_t)m_scd.BufferDesc.Height != _resolution.m_height
|
||||
|| m_resolution.m_flags != _resolution.m_flags)
|
||||
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
{
|
||||
flags &= ~BGFX_RESET_FORCE;
|
||||
|
||||
bool resize = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK);
|
||||
|
||||
m_resolution = _resolution;
|
||||
m_resolution.m_flags = flags;
|
||||
|
||||
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
|
||||
m_textVideoMem.clear();
|
||||
|
||||
m_resolution = _resolution;
|
||||
m_resolution.m_flags &= ~BGFX_RESET_FORCE;
|
||||
m_scd.BufferDesc.Width = _resolution.m_width;
|
||||
m_scd.BufferDesc.Height = _resolution.m_height;
|
||||
|
||||
|
@ -1173,12 +1173,13 @@ namespace bgfx { namespace d3d9
|
||||
;
|
||||
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY);
|
||||
|
||||
if (m_params.BackBufferWidth != _resolution.m_width
|
||||
|| m_params.BackBufferHeight != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
{
|
||||
flags &= ~BGFX_RESET_FORCE;
|
||||
|
||||
m_resolution = _resolution;
|
||||
m_resolution.m_flags = flags;
|
||||
|
||||
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
|
||||
|
@ -2348,12 +2348,12 @@ namespace bgfx { namespace gl
|
||||
{
|
||||
flags &= ~BGFX_RESET_FORCE;
|
||||
|
||||
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
|
||||
m_textVideoMem.clear();
|
||||
|
||||
m_resolution = _resolution;
|
||||
m_resolution.m_flags = flags;
|
||||
|
||||
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
|
||||
m_textVideoMem.clear();
|
||||
|
||||
if ( (flags & BGFX_RESET_HMD)
|
||||
&& m_ovr.isInitialized() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user