| 4043 | } |
| 4044 | |
| 4045 | static void SetupDrawData(ImVector<ImDrawList*>* draw_lists, ImDrawData* draw_data) |
| 4046 | { |
| 4047 | ImGuiIO& io = ImGui::GetIO(); |
| 4048 | draw_data->Valid = true; |
| 4049 | draw_data->CmdLists = (draw_lists->Size > 0) ? draw_lists->Data : NULL; |
| 4050 | draw_data->CmdListsCount = draw_lists->Size; |
| 4051 | draw_data->TotalVtxCount = draw_data->TotalIdxCount = 0; |
| 4052 | draw_data->DisplayPos = ImVec2(0.0f, 0.0f); |
| 4053 | draw_data->DisplaySize = io.DisplaySize; |
| 4054 | draw_data->FramebufferScale = io.DisplayFramebufferScale; |
| 4055 | for (int n = 0; n < draw_lists->Size; n++) |
| 4056 | { |
| 4057 | draw_data->TotalVtxCount += draw_lists->Data[n]->VtxBuffer.Size; |
| 4058 | draw_data->TotalIdxCount += draw_lists->Data[n]->IdxBuffer.Size; |
| 4059 | } |
| 4060 | } |
| 4061 | |
| 4062 | // When using this function it is sane to ensure that float are perfectly rounded to integer values, to that e.g. (int)(max.x-min.x) in user's render produce correct result. |
| 4063 | void ImGui::PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect) |