comparison examples/E04_input.nim @ 624:3f13de7d8ec4

fix: API change for shader attributes
author Sam <sam@basx.dev>
date Sat, 29 Apr 2023 18:29:19 +0700
parents 64eb53f81cf6
children c33c8e156e3e
comparison
equal deleted inserted replaced
623:fd7e5761457c 624:3f13de7d8ec4
148 scene.add newEntity("cursor", cursormesh) 148 scene.add newEntity("cursor", cursormesh)
149 149
150 # shaders 150 # shaders
151 const 151 const
152 vertexInput = @[ 152 vertexInput = @[
153 attr[Vec3f]("position", memoryLocation=VRAM), 153 attr[Vec3f]("position"),
154 attr[Vec3f]("color", memoryLocation=VRAMVisible), 154 attr[Vec3f]("color", memoryPerformanceHint=PreferFastWrite),
155 attr[Mat4]("transform", memoryLocation=VRAMVisible, perInstance=true), 155 attr[Mat4]("transform", memoryPerformanceHint=PreferFastWrite, perInstance=true),
156 ] 156 ]
157 vertexOutput = @[attr[Vec3f]("outcolor")] 157 vertexOutput = @[attr[Vec3f]("outcolor")]
158 uniforms = @[attr[Mat4]("projection")] 158 uniforms = @[attr[Mat4]("projection")]
159 fragOutput = @[attr[Vec4f]("color")] 159 fragOutput = @[attr[Vec4f]("color")]
160 vertexCode = compileGlslShader( 160 vertexCode = compileGlslShader(