mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-17 01:04:19 +00:00
Examples: OpenGL3: Minor tweaks, clarifications + not calling glBindBuffer more than necessary in the render loop.
This commit is contained in:
parent
9a0e71a6ec
commit
512d39d031
5 changed files with 32 additions and 26 deletions
|
|
@ -221,7 +221,7 @@ void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer comm
|
|||
if (!fd->IndexBuffer || fd->IndexBufferSize < index_size)
|
||||
CreateOrResizeBuffer(fd->IndexBuffer, fd->IndexBufferMemory, fd->IndexBufferSize, index_size, VK_BUFFER_USAGE_INDEX_BUFFER_BIT);
|
||||
|
||||
// Upload Vertex and index Data:
|
||||
// Upload vertex/index data into a single contiguous GPU buffer
|
||||
{
|
||||
ImDrawVert* vtx_dst = NULL;
|
||||
ImDrawIdx* idx_dst = NULL;
|
||||
|
|
@ -305,6 +305,7 @@ void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer comm
|
|||
const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
|
||||
if (pcmd->UserCallback)
|
||||
{
|
||||
// User callback (registered via ImDrawList::AddCallback)
|
||||
pcmd->UserCallback(cmd_list, pcmd);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue