Skip to content

Commit

Permalink
Fix C++ CanvasRenderer VtxOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
pkdawson committed Aug 27, 2024
1 parent b137a7a commit a5d57c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gdext/src/CanvasRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ void CanvasRenderer::Impl::RenderOne(RID vprid, ImDrawData* drawData)
if (drawCmd.VtxOffset > 0)
{
// slow implementation of RendererHasVtxOffset
int localSize = cmdList->VtxBuffer.size() - drawCmd.VtxOffset;
cmdvertices = vertices.slice(drawCmd.VtxOffset, localSize);
cmdcolors = colors.slice(drawCmd.VtxOffset, localSize);
cmduvs = uvs.slice(drawCmd.VtxOffset, localSize);
const int sliceEnd = cmdList->VtxBuffer.size();
cmdvertices = vertices.slice(drawCmd.VtxOffset, sliceEnd);
cmdcolors = colors.slice(drawCmd.VtxOffset, sliceEnd);
cmduvs = uvs.slice(drawCmd.VtxOffset, sliceEnd);
}

RID child = children[nodeN++];
Expand Down

0 comments on commit a5d57c1

Please sign in to comment.