comparison semiconginev2/rendering/shaders.nim @ 1231:70f6c1cfe005

add: incomplete cube demo
author sam <sam@basx.dev>
date Thu, 18 Jul 2024 23:48:57 +0700
parents 5dcb503ef0c0
children 42eeb59f3a43
comparison
equal deleted inserted replaced
1230:51221494caeb 1231:70f6c1cfe005
345 345
346 proc CreatePipeline*[TShader]( 346 proc CreatePipeline*[TShader](
347 renderPass: RenderPass, 347 renderPass: RenderPass,
348 topology: VkPrimitiveTopology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, 348 topology: VkPrimitiveTopology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
349 polygonMode: VkPolygonMode = VK_POLYGON_MODE_FILL, 349 polygonMode: VkPolygonMode = VK_POLYGON_MODE_FILL,
350 cullMode: VkCullModeFlagBits = VK_CULL_MODE_BACK_BIT, 350 cullMode: openArray[VkCullModeFlagBits] = [VK_CULL_MODE_BACK_BIT],
351 frontFace: VkFrontFace = VK_FRONT_FACE_CLOCKWISE, 351 frontFace: VkFrontFace = VK_FRONT_FACE_CLOCKWISE,
352 descriptorPoolLimit = 1024, 352 descriptorPoolLimit = 1024,
353 ): Pipeline[TShader] = 353 ): Pipeline[TShader] =
354 # create pipeline 354 # create pipeline
355 355
426 sType: VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, 426 sType: VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
427 depthClampEnable: VK_FALSE, 427 depthClampEnable: VK_FALSE,
428 rasterizerDiscardEnable: VK_FALSE, 428 rasterizerDiscardEnable: VK_FALSE,
429 polygonMode: polygonMode, 429 polygonMode: polygonMode,
430 lineWidth: 1.0, 430 lineWidth: 1.0,
431 cullMode: toBits [cullMode], 431 cullMode: toBits cullMode,
432 frontFace: frontFace, 432 frontFace: frontFace,
433 depthBiasEnable: VK_FALSE, 433 depthBiasEnable: VK_FALSE,
434 depthBiasConstantFactor: 0.0, 434 depthBiasConstantFactor: 0.0,
435 depthBiasClamp: 0.0, 435 depthBiasClamp: 0.0,
436 depthBiasSlopeFactor: 0.0, 436 depthBiasSlopeFactor: 0.0,