瀏覽代碼

ImDrawListSplitter: fixed an issue merging channels if the last submitted draw command used a different texture. (#2506)

omar 6 年之前
父節點
當前提交
098591fe4c
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      docs/CHANGELOG.txt
  2. 1 0
      imgui_draw.cpp

+ 1 - 0
docs/CHANGELOG.txt

@@ -56,6 +56,7 @@ Other Changes:
   Otherwise we render ellipsis using '.' from the font from where we trim excessive spacing to make it as narrow
   Otherwise we render ellipsis using '.' from the font from where we trim excessive spacing to make it as narrow
   as possible. (#2775) [@rokups]
   as possible. (#2775) [@rokups]
 - ImDrawList: clarified the name of many parameters so reading the code is a little easier. (#2740)
 - ImDrawList: clarified the name of many parameters so reading the code is a little easier. (#2740)
+- ImDrawListSplitter: fixed an issue merging channels if the last submitted draw command used a different texture. (#2506)
 - Using offsetof() when available in C++11. Avoids Clang sanitizer complaining about old-style macros. (#94)
 - Using offsetof() when available in C++11. Avoids Clang sanitizer complaining about old-style macros. (#94)
 - Added a mechanism to compact/free the larger allocations of unused windows (buffers are compacted when
 - Added a mechanism to compact/free the larger allocations of unused windows (buffers are compacted when
   a window is unused for 60 seconds, as per io.ConfigWindowsMemoryCompactTimer = 60.0f). Note that memory
   a window is unused for 60 seconds, as per io.ConfigWindowsMemoryCompactTimer = 60.0f). Note that memory

+ 1 - 0
imgui_draw.cpp

@@ -1301,6 +1301,7 @@ void ImDrawListSplitter::Merge(ImDrawList* draw_list)
     }
     }
     draw_list->_IdxWritePtr = idx_write;
     draw_list->_IdxWritePtr = idx_write;
     draw_list->UpdateClipRect(); // We call this instead of AddDrawCmd(), so that empty channels won't produce an extra draw call.
     draw_list->UpdateClipRect(); // We call this instead of AddDrawCmd(), so that empty channels won't produce an extra draw call.
+    draw_list->UpdateTextureID();
     _Count = 1;
     _Count = 1;
 }
 }