diff examples/hello_triangle.nim @ 24:71bbe11d8de8

did: change shader compilation to run during program compilation, maybe add dynamic version later
author Sam <sam@basx.dev>
date Wed, 11 Jan 2023 11:15:02 +0700
parents 316923e9247c
children b1b05d4efb52
line wrap: on
line diff
--- a/examples/hello_triangle.nim	Wed Jan 11 00:43:43 2023 +0700
+++ b/examples/hello_triangle.nim	Wed Jan 11 11:15:02 2023 +0700
@@ -14,14 +14,14 @@
 # vertex data (types must match the above VertexAttributes)
 const
   triangle_pos = @[
-    Vec2([-0.5'f32, -0.5'f32]),
+    Vec2([ 0.0'f32, -0.5'f32]),
     Vec2([ 0.5'f32,  0.5'f32]),
     Vec2([-0.5'f32,  0.5'f32]),
   ]
   triangle_color = @[
-    Vec3([1.0'f32, 1.0'f32, 0.0'f32]),
+    Vec3([1.0'f32, 0.0'f32, 0.0'f32]),
     Vec3([0.0'f32, 1.0'f32, 0.0'f32]),
-    Vec3([0.0'f32, 1.0'f32, 1.0'f32]),
+    Vec3([0.0'f32, 0.0'f32, 1.0'f32]),
   ]
 
 when isMainModule: