# HG changeset patch # User Sam # Date 1703777592 -25200 # Node ID 64bf751ca68079b614aff1a1011f9169ba523477 # Parent e5d7e3f6826eec53428033a14f63fd186fd183c3 did: an "intermediate" commit, for syncing between machines, nothing special to see here diff -r e5d7e3f6826e -r 64bf751ca680 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)