mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-16 00:54:19 +00:00
Big example binding refactor (manually imported from Viewport branch, stripped out of Viewport code). (#1870)
Read examples/README.txt for some details. ImDrawData: Added DisplayPos, DisplaySize fields honored by all backends (not strictly necessary to honor just now, but doing it to be ahead)
This commit is contained in:
parent
8e48ab6b19
commit
85f9694bd4
84 changed files with 3655 additions and 3941 deletions
|
|
@ -4218,10 +4218,13 @@ void ImDrawDataBuilder::FlattenIntoSingleLayer()
|
|||
|
||||
static void SetupDrawData(ImVector<ImDrawList*>* draw_lists, ImDrawData* out_draw_data)
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
out_draw_data->Valid = true;
|
||||
out_draw_data->CmdLists = (draw_lists->Size > 0) ? draw_lists->Data : NULL;
|
||||
out_draw_data->CmdListsCount = draw_lists->Size;
|
||||
out_draw_data->TotalVtxCount = out_draw_data->TotalIdxCount = 0;
|
||||
out_draw_data->DisplayPos = ImVec2(0.0f, 0.0f);
|
||||
out_draw_data->DisplaySize = io.DisplaySize;
|
||||
for (int n = 0; n < draw_lists->Size; n++)
|
||||
{
|
||||
out_draw_data->TotalVtxCount += draw_lists->Data[n]->VtxBuffer.Size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue