diff examples/E01_hello_triangle.nim @ 529:eb92723db7b2

fix: API changes
author Sam <sam@basx.dev>
date Sun, 05 Feb 2023 00:28:18 +0700
parents f2c97bdbb0b3
children 21c276c0a968
line wrap: on
line diff
--- a/examples/E01_hello_triangle.nim	Sun Feb 05 00:20:07 2023 +0700
+++ b/examples/E01_hello_triangle.nim	Sun Feb 05 00:28:18 2023 +0700
@@ -32,7 +32,7 @@
   var myengine = igniteEngine("Hello triangle")
 
   # build a mesh
-  var trianglemesh = new Mesh[VertexDataA]
+  var trianglemesh = new Mesh[VertexDataA, uint16]
   trianglemesh.vertexData = VertexDataA(
     position: PositionAttribute[Vec2](data: triangle_pos),
     color: ColorAttribute[Vec3](data: triangle_color),
@@ -43,7 +43,7 @@
   # upload data, prepare shaders, etc
   const vertexShader = generateVertexShaderCode[VertexDataA, void]()
   const fragmentShader = generateFragmentShaderCode[VertexDataA]()
-  pipeline = setupPipeline[VertexDataA, void, void](
+  pipeline = setupPipeline[VertexDataA, void, uint16](
     myengine,
     triangle,
     vertexShader,