Mercurial > games > semicongine
diff tests/test_mesh.nim @ 316:b145a05c2459
add: changing rendering system, not finished yet, also upgrading to Nim 2
author | Sam <sam@basx.dev> |
---|---|
date | Mon, 07 Aug 2023 00:23:00 +0700 |
parents | da0bd61abe91 |
children | e656c0aad093 |
line wrap: on
line diff
--- a/tests/test_mesh.nim Sun Jul 23 19:59:47 2023 +0700 +++ b/tests/test_mesh.nim Mon Aug 07 00:23:00 2023 +0700 @@ -5,7 +5,7 @@ var ent2 = newEntity("hehe", [], ent1) var myScene = newScene("hi", ent2) myScene.root.transform = translate3d(0.2'f32, 0'f32, 0'f32) - myScene.root.children[0].transform = translate3d(0'f32, 0.2'f32, 0'f32) + myScene.root[0].transform = translate3d(0'f32, 0.2'f32, 0'f32) var scenes = [ # loadScene("default_cube.glb", "1"), # loadScene("default_cube1.glb", "3"), @@ -55,7 +55,7 @@ ) engine.setRenderer(engine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode, clearColor=newVec4f(0, 0, 0, 1))) for scene in scenes.mitems: - engine.addScene(scene, vertexInput, samplers, transformAttribute="transform") + engine.addScene(scene, vertexInput, samplers, transformAttribute="transform", materialIndexAttribute="") scene.addShaderGlobal("projection", Unit4) scene.addShaderGlobal("view", Unit4) var