Fix GLES wireframe overlay with non-indexed draw

Wireframe overlay was missing the offset of the first vertex in the
draw call and resulted in showing an incorrect wireframe.

This is easily fixed by using the vertexOffset as the first index to
use, just like an indexOffset.
This commit is contained in:
Jules Maselbas
2026-06-09 18:09:02 +09:00
committed by Baldur Karlsson
parent a4e158eafa
commit 6660344c3d
+2 -1
View File
@@ -805,9 +805,10 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, Debug
{
// generate 'index' list
rdcarray<uint32_t> idxs;
uint32_t offset = action->vertexOffset;
idxs.resize(action->numIndices);
for(uint32_t i = 0; i < action->numIndices; i++)
idxs[i] = i;
idxs[i] = i + offset;
PatchLineStripIndexBuffer(action, drawParams.topo, NULL, NULL, idxs.data(), patchedIndices);
}