Mercurial > games > semicongine
comparison examples/E01_hello_triangle.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 |
---|---|
1 import semicongine | 1 import semicongine |
2 | 2 |
3 | 3 |
4 const | 4 const |
5 vertexInput = @[ | 5 vertexInput = @[ |
6 attr[Vec3f]("position", memoryLocation=VRAM), | 6 attr[Vec3f]("position"), |
7 attr[Vec3f]("color", memoryLocation=VRAM), | 7 attr[Vec3f]("color"), |
8 ] | 8 ] |
9 vertexOutput = @[attr[Vec3f]("outcolor")] | 9 vertexOutput = @[attr[Vec3f]("outcolor")] |
10 fragOutput = @[attr[Vec4f]("color")] | 10 fragOutput = @[attr[Vec4f]("color")] |
11 vertexCode = compileGlslShader( | 11 vertexCode = compileGlslShader( |
12 stage=VK_SHADER_STAGE_VERTEX_BIT, | 12 stage=VK_SHADER_STAGE_VERTEX_BIT, |