Overlay-Next: Fix glitches with the grid
The vertex array was allocating uninitialized memory. This fixes the API usage mistake and do the intended reserve call.
This commit is contained in:
@@ -1376,7 +1376,8 @@ ShapeCache::ShapeCache()
|
||||
steps[i] = -1.0f + float(i * 2) / resolution;
|
||||
}
|
||||
|
||||
Vector<Vertex> verts(resolution * resolution * 6);
|
||||
Vector<Vertex> verts;
|
||||
verts.reserve(resolution * resolution * 6);
|
||||
for (const int x : IndexRange(resolution)) {
|
||||
for (const int y : IndexRange(resolution)) {
|
||||
verts.append(Vertex{{steps[x], steps[y], 0.0f}});
|
||||
|
||||
Reference in New Issue
Block a user