comparison tests/test_vulkan_wrapper.nim @ 226:3cbbf50e9e4c

del: unused diagnostic function
author Sam <sam@basx.dev>
date Mon, 15 May 2023 18:25:24 +0700
parents 744285b47a4d
children 0ec43b857a7e
comparison
equal deleted inserted replaced
225:d078b19bf531 226:3cbbf50e9e4c
1 import std/options
2
3 import semicongine 1 import semicongine
4
5 proc diagnostics(instance: Instance) =
6 # diagnostic output
7 # print basic driver infos
8 echo "Layers"
9 for layer in getLayers():
10 echo " " & layer
11 echo "Instance extensions"
12 for extension in getInstanceExtensions():
13 echo " " & extension
14
15 echo "Devices"
16 for device in instance.getPhysicalDevices():
17 echo " " & $device
18 echo " Rating: " & $device.rateGraphics()
19 echo " Extensions"
20 for extension in device.getExtensions():
21 echo " " & $extension
22 echo " Properties"
23 echo " " & $device.properties
24 echo " Features"
25 echo " " & $device.features
26 echo " Queue families"
27 for queueFamily in device.getQueueFamilies():
28 echo " " & $queueFamily
29 echo " Surface present modes"
30 for mode in device.getSurfacePresentModes():
31 echo " " & $mode
32 echo " Surface formats"
33 for format in device.getSurfaceFormats():
34 echo " " & $format
35 2
36 proc scene_different_mesh_types(): Entity = 3 proc scene_different_mesh_types(): Entity =
37 result = newEntity("root", 4 result = newEntity("root",
38 newEntity("triangle1", newMesh( 5 newEntity("triangle1", newMesh(
39 positions=[newVec3f(0.0, -0.5), newVec3f(0.5, 0.5), newVec3f(-0.5, 0.5)], 6 positions=[newVec3f(0.0, -0.5), newVec3f(0.5, 0.5), newVec3f(-0.5, 0.5)],
98 65
99 proc scene_primitives(): Entity = 66 proc scene_primitives(): Entity =
100 var r = rect(color="ff0000") 67 var r = rect(color="ff0000")
101 var t = tri(color="0000ff") 68 var t = tri(color="0000ff")
102 var c = circle(color="00ff00") 69 var c = circle(color="00ff00")
70
103 r.setInstanceData("translate", @[newVec3f(0.5, -0.3)]) 71 r.setInstanceData("translate", @[newVec3f(0.5, -0.3)])
104 t.setInstanceData("translate", @[newVec3f(0.3, 0.3)]) 72 t.setInstanceData("translate", @[newVec3f(0.3, 0.3)])
105 c.setInstanceData("translate", @[newVec3f(-0.3, 0.1)]) 73 c.setInstanceData("translate", @[newVec3f(-0.3, 0.1)])
106 result = newEntity("root", t, r, c) 74 result = newEntity("root", t, r, c)
107 75