comparison examples/E03_hello_cube.nim @ 68:bdef52f3bc0d

fix: API changes
author Sam <sam@basx.dev>
date Sun, 05 Feb 2023 00:28:18 +0700
parents 0f04ba283558
children 779607656b12
comparison
equal deleted inserted replaced
67:31ccaeee09c9 68:bdef52f3bc0d
83 83
84 when isMainModule: 84 when isMainModule:
85 var myengine = igniteEngine("Hello cube") 85 var myengine = igniteEngine("Hello cube")
86 86
87 # build a mesh 87 # build a mesh
88 var trianglemesh = new IndexedMesh[VertexDataA, uint16] 88 var trianglemesh = new Mesh[VertexDataA, uint16]
89 trianglemesh.indexed = true
89 trianglemesh.vertexData = VertexDataA( 90 trianglemesh.vertexData = VertexDataA(
90 position: PositionAttribute[Vec3](data: cube_pos), 91 position: PositionAttribute[Vec3](data: cube_pos),
91 color: ColorAttribute[Vec3](data: cube_color), 92 color: ColorAttribute[Vec3](data: cube_color),
92 ) 93 )
93 trianglemesh.indices = tris 94 trianglemesh.indices = tris