KDGpu::GraphicsPipeline¶
Module: Public API
Represents a complete graphics rendering pipeline state. More...
#include <KDGpu/graphics_pipeline.h>
Public Functions¶
| Name | |
|---|---|
| GraphicsPipeline() | |
| ~GraphicsPipeline() | |
| GraphicsPipeline(GraphicsPipeline && other) | |
| GraphicsPipeline & | operator=(GraphicsPipeline && other) |
| GraphicsPipeline(const GraphicsPipeline & ) =delete | |
| GraphicsPipeline & | operator=(const GraphicsPipeline & ) =delete |
| const Handle< GraphicsPipeline_t > & | handle() const |
| bool | isValid() const |
| operator Handle< GraphicsPipeline_t >() const |
Friends¶
| Name | |
|---|---|
| class | Device |
| KDGPU_EXPORT bool | operator==(const GraphicsPipeline & a, const GraphicsPipeline & b) |
Detailed Description¶
1 | |
Represents a complete graphics rendering pipeline state.
Vulkan equivalent:VkPipeline (graphics)
GraphicsPipeline encapsulates all state needed for a draw call: shaders, vertex input layout, rasterization state, depth/stencil testing, blending, and more. In KDGpu, pipelines are immutable once created.
Key components:
- Shader stages (vertex, fragment, geometry, etc.)
- Vertex input layout and attributes
- Primitive topology (triangles, lines, points)
- Viewport and scissor configuration
- Rasterization state (culling, polygon mode)
- Depth and stencil testing
- Color blending and write masks
- Pipeline layout (descriptor sets, push constants)
Lifetime: Pipelines are created by Device and must remain valid while referenced by render passes. They use RAII and clean up automatically.
¶
Usage¶
Creating a simple pipeline:
1 2 3 4 5 | |
Filename: kdgpu_doc_snippets.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
Filename: kdgpu_doc_snippets.cpp
Pipeline with depth testing:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Filename: kdgpu_doc_snippets.cpp
Alpha blending:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
Filename: kdgpu_doc_snippets.cpp
Culling configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
Filename: kdgpu_doc_snippets.cpp
Multisampling:
1 2 3 4 5 6 7 8 9 10 11 | |
Filename: kdgpu_doc_snippets.cpp
¶
Vulkan mapping:¶
- GraphicsPipeline creation -> vkCreateGraphicsPipelines()
- Bound with vkCmdBindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS)
¶
See also:¶
Device, GraphicsPipelineOptions, PipelineLayout, ShaderModule, ComputePipeline
Public Functions Documentation¶
function GraphicsPipeline¶
1 | |
function ~GraphicsPipeline¶
1 | |
function GraphicsPipeline¶
1 2 3 | |
function operator=¶
1 2 3 | |
function GraphicsPipeline¶
1 2 3 | |
function operator=¶
1 2 3 | |
function handle¶
1 | |
function isValid¶
1 | |
function operator Handle< GraphicsPipeline_t >¶
1 | |
Friends¶
friend Device¶
1 2 3 | |
friend operator==¶
1 2 3 4 5 | |
Updated on 2026-03-31 at 00:02:07 +0000