This commit is contained in:
Branimir Karadžić 2015-10-21 22:04:28 -07:00
parent f6d433f4ff
commit f7130318c0
4 changed files with 23 additions and 17 deletions

View file

@ -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();

View file

@ -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;

View file

@ -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);

View file

@ -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() )
{