comparison examples/E03_hello_cube.nim @ 529:eb92723db7b2

fix: API changes
author Sam <sam@basx.dev>
date Sun, 05 Feb 2023 00:28:18 +0700
parents f2c97bdbb0b3
children 21c276c0a968
comparison
equal deleted inserted replaced
528:3ec1be39e1ad 529:eb92723db7b2
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