comparison examples/E01_hello_triangle.nim @ 1139:114f395b9144

did: finish refactoring and updated all tests accordingly
author sam <sam@basx.dev>
date Sat, 08 Jun 2024 14:58:25 +0700
parents 71315636ba82
children 5934c5615f13
comparison
equal deleted inserted replaced
1138:02e1d2658ff5 1139:114f395b9144
20 var 20 var
21 scene = Scene(name: "scene", 21 scene = Scene(name: "scene",
22 meshes: @[newMesh( 22 meshes: @[newMesh(
23 positions = [NewVec3f(-0.5, 0.5), NewVec3f(0, -0.5), NewVec3f(0.5, 0.5)], 23 positions = [NewVec3f(-0.5, 0.5), NewVec3f(0, -0.5), NewVec3f(0.5, 0.5)],
24 colors = [NewVec4f(1, 0, 0, 1), NewVec4f(0, 1, 0, 1), NewVec4f(0, 0, 1, 1)], 24 colors = [NewVec4f(1, 0, 0, 1), NewVec4f(0, 1, 0, 1), NewVec4f(0, 0, 1, 1)],
25 material = VERTEX_COLORED_MATERIAL.initMaterialData() 25 material = VERTEX_COLORED_MATERIAL.InitMaterialData()
26 )] 26 )]
27 ) 27 )
28 myengine = initEngine("Hello triangle", showFps = true) 28 myengine = initEngine("Hello triangle", showFps = true)
29 29
30 myengine.initRenderer({VERTEX_COLORED_MATERIAL: shaderConfiguration}, inFlightFrames = 2) 30 myengine.initRenderer({VERTEX_COLORED_MATERIAL: shaderConfiguration}, inFlightFrames = 2)