Mercurial > games > semicongine
diff examples/E01_hello_triangle.nim @ 136:fc5db4f1f94e
did: rewrite example 02 with new engine approach
| author | Sam <sam@basx.dev> | 
|---|---|
| date | Thu, 20 Apr 2023 23:46:22 +0700 | 
| parents | 9f2c178beb60 | 
| children | a4e6e76128e6 | 
line wrap: on
 line diff
--- a/examples/E01_hello_triangle.nim Thu Apr 20 23:45:57 2023 +0700 +++ b/examples/E01_hello_triangle.nim Thu Apr 20 23:46:22 2023 +0700 @@ -1,6 +1,3 @@ -import std/strutils -import std/enumerate - import semicongine @@ -15,7 +12,10 @@ stage=VK_SHADER_STAGE_VERTEX_BIT, inputs=vertexInput, outputs=vertexOutput, - main="""gl_Position = vec4(position, 1.0); outcolor = color;""" + main=""" + gl_Position = vec4(position, 1.0); + outcolor = color; + """ ) fragmentCode = compileGlslShader( stage=VK_SHADER_STAGE_FRAGMENT_BIT,
