Fixed view id remapping.

This commit is contained in:
Branimir Karadžić
2017-11-27 15:57:31 -08:00
parent 1e16af3701
commit 7384171900
4 changed files with 8 additions and 8 deletions

View File

@@ -396,7 +396,7 @@ struct OcornutImguiContext
, int _width
, int _height
, char _inputChar
, uint8_t _viewId
, bgfx::ViewId _viewId
)
{
m_viewId = _viewId;
@@ -455,7 +455,7 @@ struct OcornutImguiContext
ImFont* m_font[ImGui::Font::Count];
int64_t m_last;
int32_t m_lastScroll;
uint8_t m_viewId;
bgfx::ViewId m_viewId;
};
static OcornutImguiContext s_ctx;
@@ -485,7 +485,7 @@ void imguiDestroy()
s_ctx.destroy();
}
void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar, uint8_t _viewId)
void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar, bgfx::ViewId _viewId)
{
s_ctx.beginFrame(_mx, _my, _button, _scroll, _width, _height, _inputChar, _viewId);
}

View File

@@ -30,7 +30,7 @@ namespace bx { struct AllocatorI; }
void imguiCreate(float _fontSize = 18.0f, bx::AllocatorI* _allocator = NULL);
void imguiDestroy();
void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar = 0, uint8_t _view = 255);
void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar = 0, bgfx::ViewId _view = 255);
void imguiEndFrame();
namespace entry { class AppI; }

View File

@@ -996,7 +996,7 @@ namespace bgfx
}
/// Returns true if item is compute command.
bool decode(uint64_t _key, uint8_t _viewRemap[BGFX_CONFIG_MAX_VIEWS])
bool decode(uint64_t _key, ViewId _viewRemap[BGFX_CONFIG_MAX_VIEWS])
{
m_view = _viewRemap[(_key & SORT_KEY_VIEW_MASK) >> SORT_KEY_VIEW_SHIFT];
if (_key & SORT_KEY_DRAW_BIT)
@@ -1865,7 +1865,7 @@ namespace bgfx
m_freeUniform.reset();
}
uint8_t m_viewRemap[BGFX_CONFIG_MAX_VIEWS];
ViewId m_viewRemap[BGFX_CONFIG_MAX_VIEWS];
float m_colorPalette[BGFX_CONFIG_MAX_COLOR_PALETTE][4];
View m_view[BGFX_CONFIG_MAX_VIEWS];

View File

@@ -18,7 +18,7 @@ extern "C"
#define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x5)
#define BGFX_SHADERC_VERSION_MAJOR 1
#define BGFX_SHADERC_VERSION_MINOR 5
#define BGFX_SHADERC_VERSION_MINOR 6
namespace bgfx
{
@@ -151,7 +151,7 @@ namespace bgfx
BX_STATIC_ASSERT(BX_COUNTOF(s_uniformTypeName) == UniformType::Count*2);
Options::Options()
Options::Options()
: shaderType(' ')
, disasm(false)
, raw(false)