Mercurial > games > semicongine
comparison examples/E02_squares.nim @ 148:ae8b0d89a2ee
del: debug code
author | Sam <sam@basx.dev> |
---|---|
date | Thu, 27 Apr 2023 00:30:19 +0700 |
parents | a4e6e76128e6 |
children | 25d97fa0ad5c |
comparison
equal
deleted
inserted
replaced
147:3dffa1f38a33 | 148:ae8b0d89a2ee |
---|---|
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)) |