IMGUI_APIImDrawData*GetDrawData();// same value as passed to your RenderDrawListsFn() function. valid after Render() and until the next call to NewFrame()
// See example code if you are unsure of how to implement this.
// Rendering function, will be called in Render().
// Alternatively you can keep this to NULL and call GetDrawData() after Render() to get the same pointer.
// See example applications if you are unsure of how to implement this.
void(*RenderDrawListsFn)(ImDrawData*data);
// Optional: access OS clipboard
@ -1149,14 +1151,16 @@ struct ImDrawList
// All draw data to render an ImGui frame
structImDrawData
{
boolValid;// Only valid after Render() is called and before the next NewFrame() is called.
ImDrawList**CmdLists;
intCmdListsCount;
intTotalVtxCount;// For convenience, sum of all cmd_lists vtx_buffer.Size
intTotalIdxCount;// For convenience, sum of all cmd_lists idx_buffer.Size
// Functions
voidDeIndexAllBuffers();// For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
voidScaleClipRects(constImVec2&sc);// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.
IMGUI_APIvoidDeIndexAllBuffers();// For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
IMGUI_APIvoidScaleClipRects(constImVec2&sc);// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.