comparison examples/E03_hello_cube.nim @ 624:3f13de7d8ec4

fix: API change for shader attributes
author Sam <sam@basx.dev>
date Sat, 29 Apr 2023 18:29:19 +0700
parents f41c1b78cf5b
children c33c8e156e3e
comparison
equal deleted inserted replaced
623:fd7e5761457c 624:3f13de7d8ec4
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"),