Mercurial > games > semicongine
diff tests/test_vulkan_wrapper.nim @ 112:0c5a74885796
did: real implementation of buffer and memory, getting closer to collect shit for drawing per pipeline
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 01 Apr 2023 00:40:02 +0700 |
parents | 6fd10b7e2d6a |
children | 7b695fb335ed |
line wrap: on
line diff
--- a/tests/test_vulkan_wrapper.nim Fri Mar 31 16:00:16 2023 +0700 +++ b/tests/test_vulkan_wrapper.nim Sat Apr 01 00:40:02 2023 +0700 @@ -1,4 +1,3 @@ -import std/os import std/options import semicongine/vulkan @@ -7,16 +6,7 @@ import semicongine/entity import semicongine/scene import semicongine/gpu_data - -type - Vertex = object - pos: Vec3 - FragmentInput = object - fragpos: Vec3 - Uniforms = object - time: float32 - Pixel = object - color: Vec4 +import semicongine/mesh proc diagnostics(instance: Instance) = # diagnostic output @@ -83,11 +73,11 @@ if res != VK_SUCCESS: raise newException(Exception, "Unable to create swapchain") - var thescene = Scene(root: newEntity("scene")) + var thescene = Scene(name: "main", root: newEntity("triangle", newMesh([newVec3(-1, -1), newVec3(0, 1), newVec3(1, -1)]))) thescene.setupDrawables(renderPass) echo "Setup successfull, start rendering" - for i in 0 ..< 10: + for i in 0 ..< 1: discard swapchain.drawScene(thescene) echo "Rendered ", swapchain.framesRendered, " frames" echo "Start cleanup"