changeset 402:6001079399a6

did: an "intermediate" commit, for syncing between machines, nothing special to see here
author Sam <sam@basx.dev>
date Thu, 28 Dec 2023 22:33:12 +0700
parents 0f87e84d57fd
children 6406a5af430d
files semicongine/mesh.nim
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)