Mercurial > games > semicongine
comparison examples/E02_squares.nim @ 609:23e41f5adbaf
del: debug code
author | Sam <sam@basx.dev> |
---|---|
date | Thu, 27 Apr 2023 00:30:19 +0700 |
parents | f41c1b78cf5b |
children | 3f13de7d8ec4 |
comparison
equal
deleted
inserted
replaced
608:1698c8ab9203 | 609:23e41f5adbaf |
---|---|
78 positions=vertices, | 78 positions=vertices, |
79 indices=indices, | 79 indices=indices, |
80 colors=colors, | 80 colors=colors, |
81 ) | 81 ) |
82 setMeshData[uint32](squaremesh, "index", iValues.toSeq) | 82 setMeshData[uint32](squaremesh, "index", iValues.toSeq) |
83 var i = 0'u64 | |
84 var (p, l) = squaremesh.getRawData("color") | |
85 while i < uint64(l): | |
86 echo (cast[ptr float32]((cast[uint64](p) + i)))[] | |
87 inc i | |
88 | 83 |
89 var myengine = initEngine("Squares") | 84 var myengine = initEngine("Squares") |
90 myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)) | 85 myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)) |
91 | 86 |
92 var scene = newEntity("scene", newEntity("squares", squaremesh)) | 87 var scene = newEntity("scene", newEntity("squares", squaremesh)) |