Mercurial > games > semicongine
comparison examples/E02_squares.nim @ 163:25d97fa0ad5c
fix: API change for shader attributes
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 29 Apr 2023 18:29:19 +0700 |
parents | ae8b0d89a2ee |
children | 84fd522fdf3f |
comparison
equal
deleted
inserted
replaced
162:68947a8ee127 | 163:25d97fa0ad5c |
---|---|
44 indices[squareIndex * 2 + 1] = [uint16(vertIndex + 2), uint16(vertIndex + 3), uint16(vertIndex + 0)] | 44 indices[squareIndex * 2 + 1] = [uint16(vertIndex + 2), uint16(vertIndex + 3), uint16(vertIndex + 0)] |
45 | 45 |
46 | 46 |
47 const | 47 const |
48 vertexInput = @[ | 48 vertexInput = @[ |
49 attr[Vec3f]("position", memoryLocation=VRAM), | 49 attr[Vec3f]("position"), |
50 attr[Vec3f]("color", memoryLocation=VRAMVisible), | 50 attr[Vec3f]("color", memoryPerformanceHint=PreferFastWrite), |
51 attr[uint32]("index", memoryLocation=VRAM), | 51 attr[uint32]("index"), |
52 ] | 52 ] |
53 vertexOutput = @[attr[Vec3f]("outcolor")] | 53 vertexOutput = @[attr[Vec3f]("outcolor")] |
54 uniforms = @[attr[float32]("time")] | 54 uniforms = @[attr[float32]("time")] |
55 fragOutput = @[attr[Vec4f]("color")] | 55 fragOutput = @[attr[Vec4f]("color")] |
56 vertexCode = compileGlslShader( | 56 vertexCode = compileGlslShader( |