Branimir Karadžić 8 年之前
父节点
当前提交
0d2fc80372

+ 1 - 1
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.
     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.
     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.
     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; }
     ImDrawCmd() { ElemCount = 0; ClipRect.x = ClipRect.y = ClipRect.z = ClipRect.w = 0.0f; TextureId = NULL; UserCallback = NULL; UserCallbackData = NULL; ViewId = 0; }
 };
 };

+ 2 - 2
3rdparty/ocornut-imgui/imgui_draw.cpp

@@ -351,7 +351,7 @@ void ImDrawList::AddDrawCmd()
     ImDrawCmd draw_cmd;
     ImDrawCmd draw_cmd;
     draw_cmd.ClipRect = GetCurrentClipRect();
     draw_cmd.ClipRect = GetCurrentClipRect();
     draw_cmd.TextureId = GetCurrentTextureId();
     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);
     IM_ASSERT(draw_cmd.ClipRect.x <= draw_cmd.ClipRect.z && draw_cmd.ClipRect.y <= draw_cmd.ClipRect.w);
     CmdBuffer.push_back(draw_cmd);
     CmdBuffer.push_back(draw_cmd);
@@ -486,7 +486,7 @@ void ImDrawList::ChannelsSplit(int channels_count)
             ImDrawCmd draw_cmd;
             ImDrawCmd draw_cmd;
             draw_cmd.ClipRect = _ClipRectStack.back();
             draw_cmd.ClipRect = _ClipRectStack.back();
             draw_cmd.TextureId = _TextureIdStack.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);
             _Channels[i].CmdBuffer.push_back(draw_cmd);
         }
         }
     }
     }

+ 5 - 5
examples/common/debugdraw/debugdraw.cpp

@@ -922,7 +922,7 @@ struct DebugDraw
 		m_geometry.destroy(_handle);
 		m_geometry.destroy(_handle);
 	}
 	}
 
 
-	void begin(uint8_t _viewId)
+	void begin(bgfx::ViewId _viewId)
 	{
 	{
 		BX_CHECK(State::Count == m_state);
 		BX_CHECK(State::Count == m_state);
 
 
@@ -2234,9 +2234,9 @@ private:
 
 
 	MatrixStack m_mtxStack[32];
 	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];
 	Attrib m_attrib[stackSize];
 
 
@@ -2293,7 +2293,7 @@ void ddDestroy(GeometryHandle _handle)
 	s_dd.destroy(_handle);
 	s_dd.destroy(_handle);
 }
 }
 
 
-void ddBegin(uint8_t _viewId)
+void ddBegin(uint16_t _viewId)
 {
 {
 	s_dd.begin(_viewId);
 	s_dd.begin(_viewId);
 }
 }

+ 1 - 1
examples/common/debugdraw/debugdraw.h

@@ -51,7 +51,7 @@ GeometryHandle ddCreateGeometry(uint32_t _numVertices, const DdVertex* _vertices
 void ddDestroy(GeometryHandle _handle);
 void ddDestroy(GeometryHandle _handle);
 
 
 ///
 ///
-void ddBegin(uint8_t _viewId);
+void ddBegin(uint16_t _viewId);
 
 
 ///
 ///
 void ddEnd();
 void ddEnd();