Mercurial > games > semicongine
diff examples/E01_hello_triangle.nim @ 336:887ddc8d45fd
did: update examples to work with improved scenegraph/material api, notice removed complexity!
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 05 Sep 2023 00:28:35 +0700 |
parents | f05b4bef44d1 |
children | c66503386e8b |
line wrap: on
line diff
--- a/examples/E01_hello_triangle.nim Mon Sep 04 00:55:35 2023 +0700 +++ b/examples/E01_hello_triangle.nim Tue Sep 05 00:28:35 2023 +0700 @@ -21,12 +21,12 @@ meshes: @[newMesh( [newVec3f(-0.5, 0.5), newVec3f(0, -0.5), newVec3f(0.5, 0.5)], [newVec4f(1, 0, 0, 1), newVec4f(0, 1, 0, 1), newVec4f(0, 0, 1, 1)], - material=Material(name: "") + material=Material(name: "default") )] ) myengine = initEngine("Hello triangle") -myengine.initRenderer({"": shaderConfiguration}.toTable) +myengine.initRenderer({"default": shaderConfiguration}.toTable) myengine.addScene(triangle) while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape):