diff tests/test_collision.nim @ 371:f054b8bacab8

fix: tests, test_materials and test_mesh still needs to be done
author Sam <sam@basx.dev>
date Wed, 22 Nov 2023 23:24:47 +0700
parents 00231e014642
children 73b572f82a1f
line wrap: on
line diff
--- a/tests/test_collision.nim	Wed Nov 22 23:24:07 2023 +0700
+++ b/tests/test_collision.nim	Wed Nov 22 23:24:47 2023 +0700
@@ -6,6 +6,9 @@
   scene.add rect(color="f00f")
   scene.add rect()
   scene.add circle(color="0f0f")
+  scene.meshes[0].material = VERTEX_COLORED_MATERIAL.initMaterialData()
+  scene.meshes[1].material = VERTEX_COLORED_MATERIAL.initMaterialData()
+  scene.meshes[2].material = VERTEX_COLORED_MATERIAL.initMaterialData()
   scene.meshes[1].transform = scale(0.8, 0.8)
   scene.meshes[2].transform = scale(0.1, 0.1)
   scene.addShaderGlobal("perspective", Unit4F32)
@@ -26,8 +29,8 @@
 
   var engine = initEngine("Test collisions")
 
-  engine.initRenderer({"default material": shaderConfiguration})
-  engine.addScene(scene)
+  engine.initRenderer({VERTEX_COLORED_MATERIAL: shaderConfiguration})
+  engine.loadScene(scene)
 
   while engine.updateInputs() == Running and not engine.keyIsDown(Escape):
     if engine.windowWasResized():