Renamed reset flag.

This commit is contained in:
Branimir Karadžić 2015-04-15 11:49:20 -07:00
parent 9d91d3bbbc
commit 4210fb0d64
5 changed files with 11 additions and 8 deletions

View file

@ -124,7 +124,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|| setOrToggle(s_reset, "hmddbg", BGFX_RESET_HMD_DEBUG, 1, _argc, _argv)
|| setOrToggle(s_reset, "hmdrecenter", BGFX_RESET_HMD_RECENTER, 1, _argc, _argv)
|| setOrToggle(s_reset, "msaa", BGFX_RESET_MSAA_X16, 1, _argc, _argv)
|| setOrToggle(s_reset, "flip", BGFX_RESET_FLIP_AFTER_SUBMIT, 1, _argc, _argv)
|| setOrToggle(s_reset, "flip", BGFX_RESET_FLIP_AFTER_RENDER, 1, _argc, _argv)
)
{
return 0;

View file

@ -576,7 +576,9 @@ namespace bgfx
/// - `BGFX_RESET_HMD` - HMD stereo rendering.
/// - `BGFX_RESET_HMD_DEBUG` - HMD stereo rendering debug mode.
/// - `BGFX_RESET_HMD_RECENTER` - HMD calibration.
/// - `BGFX_RESET_FLIP_AFTER_SUBMIT` - Flip back buffer after submit.
/// - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag specifies where flip
/// occurs. Default behavior is that flip occurs before rendering new
/// frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
///
/// @attention This call doesn't actually change window size, it just
/// resizes back-buffer. Windowing code has to change window size.

View file

@ -303,7 +303,7 @@
#define BGFX_RESET_HMD UINT32_C(0x00000400)
#define BGFX_RESET_HMD_DEBUG UINT32_C(0x00000800)
#define BGFX_RESET_HMD_RECENTER UINT32_C(0x00001000)
#define BGFX_RESET_FLIP_AFTER_SUBMIT UINT32_C(0x00002000)
#define BGFX_RESET_FLIP_AFTER_RENDER UINT32_C(0x00002000)
///
#define BGFX_CAPS_TEXTURE_COMPARE_LEQUAL UINT64_C(0x0000000000000001)

View file

@ -1206,7 +1206,7 @@ namespace bgfx
bool Context::renderFrame()
{
if (m_rendererInitialized
&& !m_flipAfterSubmit)
&& !m_flipAfterRender)
{
m_renderCtx->flip();
}
@ -1223,7 +1223,7 @@ namespace bgfx
renderSemPost();
if (m_rendererInitialized
&& m_flipAfterSubmit)
&& m_flipAfterRender)
{
m_renderCtx->flip();
}

View file

@ -1893,7 +1893,7 @@ namespace bgfx
, m_renderCtx(NULL)
, m_rendererInitialized(false)
, m_exit(false)
, m_flipAfterSubmit(false)
, m_flipAfterRender(false)
{
}
@ -1928,7 +1928,7 @@ namespace bgfx
m_resolution.m_height = bx::uint32_max(1, _height);
m_resolution.m_flags = _flags;
m_flipAfterSubmit = !!(_flags & BGFX_RESET_FLIP_AFTER_SUBMIT);
m_flipAfterRender = !!(_flags & BGFX_RESET_FLIP_AFTER_RENDER);
memset(m_fb, 0xff, sizeof(m_fb) );
@ -2884,6 +2884,7 @@ namespace bgfx
TextureHandle texHandle = _handles[ii];
BGFX_CHECK_HANDLE("createFrameBuffer texture handle", m_textureHandle, texHandle);
BX_CHECK(bbRatio == m_textureRef[texHandle.idx].m_bbRatio, "Mismatch in texture back-buffer ratio.");
BX_UNUSED(bbRatio);
cmdbuf.write(texHandle);
@ -3530,7 +3531,7 @@ namespace bgfx
bool m_rendererInitialized;
bool m_exit;
bool m_flipAfterSubmit;
bool m_flipAfterRender;
typedef UpdateBatchT<256> TextureUpdateBatch;
BX_ALIGN_DECL_CACHE_LINE(TextureUpdateBatch m_textureUpdateBatch);