Mercurial > games > semicongine
comparison examples/E03_hello_cube.nim @ 763:a4c757f5d17f
did: change API for ECS
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 27 Jun 2023 00:17:40 +0700 |
parents | 5cd6808150fc |
children | 754835bf175e |
comparison
equal
deleted
inserted
replaced
762:4f991bc3613a | 763:a4c757f5d17f |
---|---|
76 uniforms=uniforms, | 76 uniforms=uniforms, |
77 outputs=fragOutput, | 77 outputs=fragOutput, |
78 main="color = outcolor;" | 78 main="color = outcolor;" |
79 ) | 79 ) |
80 myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)) | 80 myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)) |
81 var cube = newScene("scene", newEntity("cube", newMesh(positions=cube_pos, indices=tris, colors=cube_color))) | 81 var cube = newScene("scene", newEntity("cube", {"mesh": Component(newMesh(positions=cube_pos, indices=tris, colors=cube_color))})) |
82 cube.addShaderGlobal("projection", Unit4f32) | 82 cube.addShaderGlobal("projection", Unit4f32) |
83 cube.addShaderGlobal("view", Unit4f32) | 83 cube.addShaderGlobal("view", Unit4f32) |
84 cube.addShaderGlobal("model", Unit4f32) | 84 cube.addShaderGlobal("model", Unit4f32) |
85 myengine.addScene(cube, vertexInput, @[], transformAttribute="") | 85 myengine.addScene(cube, vertexInput, @[], transformAttribute="") |
86 | 86 |