Mercurial > games > semicongine
diff examples/squares.nim @ 500:8025ab67d931
fix: hello cube, add: run_all command
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 18 Jan 2023 13:49:12 +0700 |
parents | 3f1111f3b9f8 |
children | 2771db8d4276 |
line wrap: on
line diff
--- a/examples/squares.nim Wed Jan 18 09:52:03 2023 +0700 +++ b/examples/squares.nim Wed Jan 18 13:49:12 2023 +0700 @@ -68,7 +68,6 @@ indices[squareIndex * 2 + 0] = [uint16(vertIndex + 0), uint16(vertIndex + 1), uint16(vertIndex + 2)] indices[squareIndex * 2 + 1] = [uint16(vertIndex + 2), uint16(vertIndex + 3), uint16(vertIndex + 0)] - var scene = new Thing type PIndexedMesh = ref IndexedMesh[VertexDataA, uint16] # required so we can use ctor with ref/on heap var squaremesh = PIndexedMesh( @@ -79,6 +78,7 @@ ), indices: @indices ) + var scene = new Thing var childthing = new Thing childthing.parts.add squaremesh scene.children.add childthing @@ -93,11 +93,6 @@ """ ) const fragmentShader = generateFragmentShaderCode[VertexDataA]() - static: - echo "--------------" - for (i, line) in enumerate(vertexShader.splitLines()): - echo $(i + 1) & " " & line - echo "--------------" pipeline = setupPipeline[VertexDataA, Uniforms, uint16]( myengine, scene,