comparison examples/E03_hello_cube.nim @ 163:25d97fa0ad5c

fix: API change for shader attributes
author Sam <sam@basx.dev>
date Sat, 29 Apr 2023 18:29:19 +0700
parents a4e6e76128e6
children 84fd522fdf3f
comparison
equal deleted inserted replaced
162:68947a8ee127 163:25d97fa0ad5c
49 when isMainModule: 49 when isMainModule:
50 var myengine = initEngine("Hello cube") 50 var myengine = initEngine("Hello cube")
51 51
52 const 52 const
53 vertexInput = @[ 53 vertexInput = @[
54 attr[Vec3f]("position", memoryLocation=VRAM), 54 attr[Vec3f]("position"),
55 attr[Vec3f]("color", memoryLocation=VRAMVisible), 55 attr[Vec3f]("color", memoryPerformanceHint=PreferFastWrite),
56 ] 56 ]
57 vertexOutput = @[attr[Vec3f]("outcolor")] 57 vertexOutput = @[attr[Vec3f]("outcolor")]
58 uniforms = @[ 58 uniforms = @[
59 attr[Mat4]("projection"), 59 attr[Mat4]("projection"),
60 attr[Mat4]("view"), 60 attr[Mat4]("view"),