Viewport: Moved OverlayDrawList to be a per-viewport instead of being global + fix overlay clipping glitch during viewport creation frame + support for software mouse cursor stradding over multiple viewport. The overlay draw list move is rather important as draw lists are not shared among viewports anymore and we can do a swap of their data without copying it. (#1542)

This commit is contained in:
omar
2018-03-22 22:09:42 +01:00
parent 4f112f898e
commit ac8931b2e9
3 changed files with 76 additions and 46 deletions

View File

@ -502,7 +502,7 @@ namespace ImGui
IMGUI_API bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max); // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
IMGUI_API float GetTime();
IMGUI_API int GetFrameCount();
IMGUI_API ImDrawList* GetOverlayDrawList(); // this draw list will be the last rendered one, it covers all viewports. useful to quickly draw overlays shapes/text
IMGUI_API ImDrawList* GetOverlayDrawList(); // this draw list will be the last rendered. it covers the entire current viewport. useful to quickly draw overlays shapes/text
IMGUI_API ImDrawListSharedData* GetDrawListSharedData(); // you may use this when creating your own ImDrawList instances
IMGUI_API const char* GetStyleColorName(ImGuiCol idx);
IMGUI_API void SetStateStorage(ImGuiStorage* storage); // replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)