Mercurial > games > semicongine
comparison tests/test_materials.nim @ 1136:71315636ba82
did: refactor naming in tons of places
author | sam <sam@basx.dev> |
---|---|
date | Tue, 04 Jun 2024 16:51:50 +0700 |
parents | 74957cbf589b |
children | a4aa9f374d44 |
comparison
equal
deleted
inserted
replaced
1135:74957cbf589b | 1136:71315636ba82 |
---|---|
33 | 33 |
34 proc main() = | 34 proc main() = |
35 var flag = rect() | 35 var flag = rect() |
36 flag.material = material | 36 flag.material = material |
37 var scene = Scene(name: "main", meshes: @[flag]) | 37 var scene = Scene(name: "main", meshes: @[flag]) |
38 scene.addShaderGlobalArray("test2", @[newVec4f(), newVec4f()]) | 38 scene.addShaderGlobalArray("test2", @[NewVec4f(), NewVec4f()]) |
39 | 39 |
40 var engine = initEngine("Test materials") | 40 var engine = initEngine("Test materials") |
41 | 41 |
42 const | 42 const |
43 shaderConfiguration1 = createShaderConfiguration( | 43 shaderConfiguration1 = createShaderConfiguration( |
68 }) | 68 }) |
69 engine.loadScene(scene) | 69 engine.loadScene(scene) |
70 var t = cpuTime() | 70 var t = cpuTime() |
71 while engine.UpdateInputs() and not KeyIsDown(Escape): | 71 while engine.UpdateInputs() and not KeyIsDown(Escape): |
72 var d = float32(cpuTime() - t) | 72 var d = float32(cpuTime() - t) |
73 setShaderGlobalArray(scene, "test2", @[newVec4f(d), newVec4f(d * 2)]) | 73 setShaderGlobalArray(scene, "test2", @[NewVec4f(d), NewVec4f(d * 2)]) |
74 engine.renderScene(scene) | 74 engine.renderScene(scene) |
75 engine.destroy() | 75 engine.destroy() |
76 | 76 |
77 | 77 |
78 when isMainModule: | 78 when isMainModule: |