// Note that vertex buffers have been created, so it is best practice that you don't create windows in the first place, or respond to Begin() returning false
// Note that vertex buffers have been created and are wasted, so it is best practice that you don't create windows in the first place, or respond to Begin() returning false.
// NB- You most likely DO NOT need to care about draw callbacks just to create your own widget or customized UI rendering (you can poke into the draw list for that)
// NB- You most likely do NOT need to use draw callbacks just to create your own widget or customized UI rendering (you can poke into the draw list for that)
// Draw callback are useful for example if you want to render a complex 3D scene inside a UI element.
// The expected behavior from your rendering loop is:
// if (cmd.user_callback != NULL)
@ -1001,7 +1001,7 @@ struct ImDrawCmd
unsignedintidx_count;// Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
ImTextureIDtexture_id;// User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
ImDrawCallbackuser_callback;// If != NULL, call the function instead of rendering the vertices. vtx_count will be 0. clip_rect and texture_id will be set normally.
ImDrawCallbackuser_callback;// If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
void*user_callback_data;// The draw callback code can access this.