Demo: Demonstrate out-of-order rendering using ImDrawListSplitter.

This commit is contained in:
ocornut
2023-08-06 20:13:05 +02:00
parent cf3726bcbc
commit 2b1fc6f765
3 changed files with 39 additions and 1 deletions

View File

@ -2706,7 +2706,7 @@ struct ImDrawList
// Advanced: Channels
// - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives)
// - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end)
// - FIXME-OBSOLETE: This API shouldn't have been in ImDrawList in the first place!
// - This API shouldn't have been in ImDrawList in the first place!
// Prefer using your own persistent instance of ImDrawListSplitter as you can stack them.
// Using the ImDrawList::ChannelsXXXX you cannot stack a split over another.
inline void ChannelsSplit(int count) { _Splitter.Split(this, count); }