Mercurial > games > semicongine
comparison examples/E02_squares.nim @ 624:3f13de7d8ec4
fix: API change for shader attributes
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 29 Apr 2023 18:29:19 +0700 |
parents | 23e41f5adbaf |
children | c33c8e156e3e |
comparison
equal
deleted
inserted
replaced
623:fd7e5761457c | 624:3f13de7d8ec4 |
---|---|
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( |