diff examples/E01_hello_triangle.nim @ 597:fdae5f50fa00

did: rewrite example 02 with new engine approach
author Sam <sam@basx.dev>
date Thu, 20 Apr 2023 23:46:22 +0700
parents 512d33d314c4
children f41c1b78cf5b
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,