This commit is contained in:
Branimir Karadžić 2018-01-17 17:34:20 -08:00
parent b9e393e6dd
commit 0d2fc80372
4 changed files with 9 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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