# HG changeset patch # User Sam # Date 1682767759 -25200 # Node ID 25d97fa0ad5c76f3b5bc05187bf0b1931b5d83bb # Parent 68947a8ee127758961b472c8433be35efd045b55 fix: API change for shader attributes diff -r 68947a8ee127 -r 25d97fa0ad5c examples/E01_hello_triangle.nim --- a/examples/E01_hello_triangle.nim Sat Apr 29 17:41:40 2023 +0700 +++ b/examples/E01_hello_triangle.nim Sat Apr 29 18:29:19 2023 +0700 @@ -3,8 +3,8 @@ const vertexInput = @[ - attr[Vec3f]("position", memoryLocation=VRAM), - attr[Vec3f]("color", memoryLocation=VRAM), + attr[Vec3f]("position"), + attr[Vec3f]("color"), ] vertexOutput = @[attr[Vec3f]("outcolor")] fragOutput = @[attr[Vec4f]("color")] diff -r 68947a8ee127 -r 25d97fa0ad5c examples/E02_squares.nim --- a/examples/E02_squares.nim Sat Apr 29 17:41:40 2023 +0700 +++ b/examples/E02_squares.nim Sat Apr 29 18:29:19 2023 +0700 @@ -46,9 +46,9 @@ const vertexInput = @[ - attr[Vec3f]("position", memoryLocation=VRAM), - attr[Vec3f]("color", memoryLocation=VRAMVisible), - attr[uint32]("index", memoryLocation=VRAM), + attr[Vec3f]("position"), + attr[Vec3f]("color", memoryPerformanceHint=PreferFastWrite), + attr[uint32]("index"), ] vertexOutput = @[attr[Vec3f]("outcolor")] uniforms = @[attr[float32]("time")] diff -r 68947a8ee127 -r 25d97fa0ad5c examples/E03_hello_cube.nim --- a/examples/E03_hello_cube.nim Sat Apr 29 17:41:40 2023 +0700 +++ b/examples/E03_hello_cube.nim Sat Apr 29 18:29:19 2023 +0700 @@ -51,8 +51,8 @@ const vertexInput = @[ - attr[Vec3f]("position", memoryLocation=VRAM), - attr[Vec3f]("color", memoryLocation=VRAMVisible), + attr[Vec3f]("position"), + attr[Vec3f]("color", memoryPerformanceHint=PreferFastWrite), ] vertexOutput = @[attr[Vec3f]("outcolor")] uniforms = @[ diff -r 68947a8ee127 -r 25d97fa0ad5c examples/E04_input.nim --- a/examples/E04_input.nim Sat Apr 29 17:41:40 2023 +0700 +++ b/examples/E04_input.nim Sat Apr 29 18:29:19 2023 +0700 @@ -150,9 +150,9 @@ # shaders const vertexInput = @[ - attr[Vec3f]("position", memoryLocation=VRAM), - attr[Vec3f]("color", memoryLocation=VRAMVisible), - attr[Mat4]("transform", memoryLocation=VRAMVisible, perInstance=true), + attr[Vec3f]("position"), + attr[Vec3f]("color", memoryPerformanceHint=PreferFastWrite), + attr[Mat4]("transform", memoryPerformanceHint=PreferFastWrite, perInstance=true), ] vertexOutput = @[attr[Vec3f]("outcolor")] uniforms = @[attr[Mat4]("projection")] diff -r 68947a8ee127 -r 25d97fa0ad5c examples/E10_pong.nim --- a/examples/E10_pong.nim Sat Apr 29 17:41:40 2023 +0700 +++ b/examples/E10_pong.nim Sat Apr 29 18:29:19 2023 +0700 @@ -21,7 +21,7 @@ level = newEntity("Level") var playerbarmesh = rect(color=barcolor) var playerbar = newEntity("playerbar", playerbarmesh) - playerbar.transform = scale3d(barWidth, barSize, 1'f) * translate3d(0.5'f, 0'f, 0'f) + # playerbar.transform = scale3d(barWidth, barSize, 1'f) * translate3d(0.5'f, 0'f, 0'f) var player = newEntity("player", playerbar) player.transform = translate3d(0'f, 0.3'f, 0'f) level.add player