From 0d2fc80372aee188bdc0acb8bf12c3d9558ddc7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Wed, 17 Jan 2018 17:34:20 -0800 Subject: [PATCH] Cleanup. --- 3rdparty/ocornut-imgui/imgui.h | 2 +- 3rdparty/ocornut-imgui/imgui_draw.cpp | 4 ++-- examples/common/debugdraw/debugdraw.cpp | 10 +++++----- examples/common/debugdraw/debugdraw.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/3rdparty/ocornut-imgui/imgui.h b/3rdparty/ocornut-imgui/imgui.h index d8828cbab..e702d538a 100644 --- a/3rdparty/ocornut-imgui/imgui.h +++ b/3rdparty/ocornut-imgui/imgui.h @@ -1341,7 +1341,7 @@ struct ImDrawCmd ImTextureID TextureId; // User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas. ImDrawCallback UserCallback; // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally. void* UserCallbackData; // The draw callback code can access this. - unsigned char ViewId; + unsigned short ViewId; ImDrawCmd() { ElemCount = 0; ClipRect.x = ClipRect.y = ClipRect.z = ClipRect.w = 0.0f; TextureId = NULL; UserCallback = NULL; UserCallbackData = NULL; ViewId = 0; } }; diff --git a/3rdparty/ocornut-imgui/imgui_draw.cpp b/3rdparty/ocornut-imgui/imgui_draw.cpp index ec570cd99..4cc39b8ba 100644 --- a/3rdparty/ocornut-imgui/imgui_draw.cpp +++ b/3rdparty/ocornut-imgui/imgui_draw.cpp @@ -351,7 +351,7 @@ void ImDrawList::AddDrawCmd() ImDrawCmd draw_cmd; draw_cmd.ClipRect = GetCurrentClipRect(); draw_cmd.TextureId = GetCurrentTextureId(); - draw_cmd.ViewId = (unsigned char)(GImGui->Style.ViewId); + draw_cmd.ViewId = (unsigned short)(GImGui->Style.ViewId); IM_ASSERT(draw_cmd.ClipRect.x <= draw_cmd.ClipRect.z && draw_cmd.ClipRect.y <= draw_cmd.ClipRect.w); CmdBuffer.push_back(draw_cmd); @@ -486,7 +486,7 @@ void ImDrawList::ChannelsSplit(int channels_count) ImDrawCmd draw_cmd; draw_cmd.ClipRect = _ClipRectStack.back(); draw_cmd.TextureId = _TextureIdStack.back(); - draw_cmd.ViewId = (unsigned char)(GImGui->Style.ViewId); + draw_cmd.ViewId = (unsigned short)(GImGui->Style.ViewId); _Channels[i].CmdBuffer.push_back(draw_cmd); } } diff --git a/examples/common/debugdraw/debugdraw.cpp b/examples/common/debugdraw/debugdraw.cpp index ad8dedf71..9b37b4c5b 100644 --- a/examples/common/debugdraw/debugdraw.cpp +++ b/examples/common/debugdraw/debugdraw.cpp @@ -922,7 +922,7 @@ struct DebugDraw m_geometry.destroy(_handle); } - void begin(uint8_t _viewId) + void begin(bgfx::ViewId _viewId) { BX_CHECK(State::Count == m_state); @@ -2234,9 +2234,9 @@ private: MatrixStack m_mtxStack[32]; - uint8_t m_viewId; - uint8_t m_stack; - bool m_depthTestLess; + bgfx::ViewId m_viewId; + uint8_t m_stack; + bool m_depthTestLess; Attrib m_attrib[stackSize]; @@ -2293,7 +2293,7 @@ void ddDestroy(GeometryHandle _handle) s_dd.destroy(_handle); } -void ddBegin(uint8_t _viewId) +void ddBegin(uint16_t _viewId) { s_dd.begin(_viewId); } diff --git a/examples/common/debugdraw/debugdraw.h b/examples/common/debugdraw/debugdraw.h index ddaddeeb5..2547ad8d3 100644 --- a/examples/common/debugdraw/debugdraw.h +++ b/examples/common/debugdraw/debugdraw.h @@ -51,7 +51,7 @@ GeometryHandle ddCreateGeometry(uint32_t _numVertices, const DdVertex* _vertices void ddDestroy(GeometryHandle _handle); /// -void ddBegin(uint8_t _viewId); +void ddBegin(uint16_t _viewId); /// void ddEnd();