TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
vk_pipelines.h
Go to the documentation of this file.
1#pragma once
2
3#include <vulkan/vulkan.h>
4
5#include <vector>
6
8{
9public:
10 std::vector<VkPipelineShaderStageCreateInfo> _shaderStages;
11
12 VkPipelineInputAssemblyStateCreateInfo _inputAssembly;
13 VkPipelineRasterizationStateCreateInfo _rasterizer;
14 VkPipelineColorBlendAttachmentState _colorBlendAttachment;
15 VkPipelineMultisampleStateCreateInfo _multisampling;
16 VkPipelineLayout _pipelineLayout;
17 VkPipelineDepthStencilStateCreateInfo _depthStencil;
18 VkPipelineRenderingCreateInfo _renderInfo;
20
22
23 void clear();
24
25 VkPipeline build_pipeline(VkDevice device, const VkAllocationCallbacks* callbacks);
26
27 void set_shaders(VkShaderModule vertexShader, VkShaderModule fragmentShader);
28 void set_input_topology(VkPrimitiveTopology topology);
29 void set_polygon_mode(VkPolygonMode mode);
30 void set_cull_mode(VkCullModeFlags cullMode, VkFrontFace frontFace);
37
38 void set_color_attachment_format(VkFormat format);
39 void set_depth_format(VkFormat format);
41 void enable_depthtest(bool depthWriteEnable,VkCompareOp op);
42};
43
44namespace tachyon::vulkan
45{
48
49 bool load_shader_module(const char* filePath, VkDevice device, const VkAllocationCallbacks* callbacks, VkShaderModule* outShaderModule);
51}
void disable_blending()
VkPipelineRasterizationStateCreateInfo _rasterizer
Definition vk_pipelines.h:13
PipelineBuilder()
Definition vk_pipelines.h:21
void set_polygon_mode(VkPolygonMode mode)
void enable_depthtest(bool depthWriteEnable, VkCompareOp op)
VkPipelineRenderingCreateInfo _renderInfo
Definition vk_pipelines.h:18
void set_multisampling_none()
VkPipelineLayout _pipelineLayout
Definition vk_pipelines.h:16
void set_input_topology(VkPrimitiveTopology topology)
void set_shaders(VkShaderModule vertexShader, VkShaderModule fragmentShader)
void enable_blending_premultipliedalphablend()
std::vector< VkPipelineShaderStageCreateInfo > _shaderStages
Definition vk_pipelines.h:10
void enable_blending_alphablend()
void set_depth_format(VkFormat format)
void disable_depthtest()
void set_cull_mode(VkCullModeFlags cullMode, VkFrontFace frontFace)
VkFormat _colorAttachmentformat
Definition vk_pipelines.h:19
void set_multisampling_some()
VkPipelineDepthStencilStateCreateInfo _depthStencil
Definition vk_pipelines.h:17
VkPipelineInputAssemblyStateCreateInfo _inputAssembly
Definition vk_pipelines.h:12
VkPipelineColorBlendAttachmentState _colorBlendAttachment
Definition vk_pipelines.h:14
void set_color_attachment_format(VkFormat format)
void enable_blending_additive()
VkPipelineMultisampleStateCreateInfo _multisampling
Definition vk_pipelines.h:15
VkPipeline build_pipeline(VkDevice device, const VkAllocationCallbacks *callbacks)
bool load_shader_module(const char *filePath, VkDevice device, const VkAllocationCallbacks *callbacks, VkShaderModule *outShaderModule)
Definition vk_defaults.h:6