comparison tests/test_vulkan_wrapper.nim @ 188:de9dff24c422

add: image/texture creation, refactoring of some unclean parts
author Sam <sam@basx.dev>
date Thu, 04 May 2023 23:44:15 +0700
parents 061054515d28
children df92519d4d68
comparison
equal deleted inserted replaced
187:b14e078690dc 188:de9dff24c422
18 echo " Rating: " & $device.rateGraphics() 18 echo " Rating: " & $device.rateGraphics()
19 echo " Extensions" 19 echo " Extensions"
20 for extension in device.getExtensions(): 20 for extension in device.getExtensions():
21 echo " " & $extension 21 echo " " & $extension
22 echo " Properties" 22 echo " Properties"
23 echo " " & $device.getProperties() 23 echo " " & $device.properties
24 echo " Features" 24 echo " Features"
25 echo " " & $device.getFeatures() 25 echo " " & $device.features
26 echo " Queue families" 26 echo " Queue families"
27 for queueFamily in device.getQueueFamilies(): 27 for queueFamily in device.getQueueFamilies():
28 echo " " & $queueFamily 28 echo " " & $queueFamily
29 echo " Surface present modes" 29 echo " Surface present modes"
30 for mode in device.getSurfacePresentModes(): 30 for mode in device.getSurfacePresentModes():
128 fragmentCode = compileGlslShader( 128 fragmentCode = compileGlslShader(
129 stage=VK_SHADER_STAGE_FRAGMENT_BIT, 129 stage=VK_SHADER_STAGE_FRAGMENT_BIT,
130 inputs=vertexOutput, 130 inputs=vertexOutput,
131 uniforms=uniforms, 131 uniforms=uniforms,
132 outputs=fragOutput, 132 outputs=fragOutput,
133 main="color = vec4(outcolor, 1);" 133 main="color = vec4(outcolor, 0.8);"
134 ) 134 )
135 var renderPass = engine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode) 135 var renderPass = engine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)
136 engine.setRenderer(renderPass) 136 engine.setRenderer(renderPass)
137 137
138 # INIT SCENES 138 # INIT SCENES