# HG changeset patch # User Sam # Date 1703777592 -25200 # Node ID 6001079399a6cb449a18f2b24f326801fa023598 # Parent 0f87e84d57fdede5dc7162de1a8e75c176bfb17b did: an "intermediate" commit, for syncing between machines, nothing special to see here diff -r 0f87e84d57fd -r 6001079399a6 semicongine/mesh.nim --- a/semicongine/mesh.nim Wed Dec 27 16:14:36 2023 +0700 +++ b/semicongine/mesh.nim Thu Dec 28 22:33:12 2023 +0700 @@ -524,7 +524,8 @@ for w in 0 .. columns: pos.add newVec3f(center_offset_x + float32(w) * cellSize, center_offset_y + float32(h) * cellSize) col.add color - result[].smallIndices.add [uint16(0), uint16(1), uint16(2)] + if w > 0 and h > 0: + result[].smallIndices.add [uint16(0), uint16(1), uint16(2)] result[].initVertexAttribute(DEFAULT_POSITION_ATTRIBUTE, pos) result[].initVertexAttribute("color", col)