Mercurial > games > semicongine
comparison examples/E01_hello_triangle.nim @ 163:25d97fa0ad5c
fix: API change for shader attributes
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 29 Apr 2023 18:29:19 +0700 |
parents | a4e6e76128e6 |
children | 84fd522fdf3f |
comparison
equal
deleted
inserted
replaced
162:68947a8ee127 | 163:25d97fa0ad5c |
---|---|
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, |