MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / SetupViewportDrawData

Function SetupViewportDrawData

core/src/imgui/imgui.cpp:4341–4357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4339}
4340
4341static void SetupViewportDrawData(ImGuiViewportP* viewport, ImVector<ImDrawList*>* draw_lists)
4342{
4343 ImGuiIO& io = ImGui::GetIO();
4344 ImDrawData* draw_data = &viewport->DrawDataP;
4345 draw_data->Valid = true;
4346 draw_data->CmdLists = (draw_lists->Size > 0) ? draw_lists->Data : NULL;
4347 draw_data->CmdListsCount = draw_lists->Size;
4348 draw_data->TotalVtxCount = draw_data->TotalIdxCount = 0;
4349 draw_data->DisplayPos = viewport->Pos;
4350 draw_data->DisplaySize = viewport->Size;
4351 draw_data->FramebufferScale = io.DisplayFramebufferScale;
4352 for (int n = 0; n < draw_lists->Size; n++)
4353 {
4354 draw_data->TotalVtxCount += draw_lists->Data[n]->VtxBuffer.Size;
4355 draw_data->TotalIdxCount += draw_lists->Data[n]->IdxBuffer.Size;
4356 }
4357}
4358
4359// Push a clipping rectangle for both ImGui logic (hit-testing etc.) and low-level ImDrawList rendering.
4360// - When using this function it is sane to ensure that float are perfectly rounded to integer values,

Callers 1

RenderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected