|
sKit
0.0.9
|
SDL_GPUGraphicsPipeline builder class
More...
#include <PipelineBuilder.hpp>
Public Member Functions | |
| auto | shaders (SDL_GPUShader *vertexShader, SDL_GPUShader *fragmentShader) -> PipelineBuilder & |
| Tells the builder which shaders it should use to create the pipeline. More... | |
| auto | addBuffer (Uint32 slot, Uint32 stride, SDL_GPUVertexInputRate inputRate=SDL_GPU_VERTEXINPUTRATE_VERTEX) -> PipelineBuilder & |
| auto | addAttribute (Uint32 location, Uint32 bufferSlot, Uint32 offset=0, SDL_GPUVertexElementFormat format=SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3) -> PipelineBuilder & |
| auto | addColorTarget (SDL_GPUTextureFormat format) -> PipelineBuilder & |
| auto | cullMode (SDL_GPUCullMode cullMode) -> PipelineBuilder & |
| auto | build (SDL_GPUDevice *device) -> SDL_GPUGraphicsPipeline * |
SDL_GPUGraphicsPipeline builder class
Example usage:
Definition at line 20 of file PipelineBuilder.hpp.
| auto sKit::SDL::PipelineBuilder::addAttribute | ( | Uint32 | location, |
| Uint32 | bufferSlot, | ||
| Uint32 | offset = 0, |
||
| SDL_GPUVertexElementFormat | format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3 |
||
| ) | -> PipelineBuilder& |
Adds a vertex attribute to the pipeline that will be built.
| location | The shader input location index |
| bufferSlot | The binding slot of the associated vertex buffer |
| offset | The byte offset of this attribute relative to the start of the vertex element |
| format | The size and type of the attribute data |
Definition at line 29 of file PipelineBuilder.cpp.
| auto sKit::SDL::PipelineBuilder::addBuffer | ( | Uint32 | slot, |
| Uint32 | stride, | ||
| SDL_GPUVertexInputRate | inputRate = SDL_GPU_VERTEXINPUTRATE_VERTEX |
||
| ) | -> PipelineBuilder& |
Adds a vertex buffer description to the pipeline that will be built.
| slot | the binding slot of the vertex buffer |
| stride | the number of bytes between consecutive elements in the buffer |
| inputRate | Whether attribute addressing is a function of the vertex index or instance index |
Definition at line 18 of file PipelineBuilder.cpp.
| auto sKit::SDL::PipelineBuilder::addColorTarget | ( | SDL_GPUTextureFormat | format | ) | -> PipelineBuilder& |
Adds a color target to the pipeline that will be built
| format | pixel format of the texture |
Definition at line 44 of file PipelineBuilder.cpp.
| auto sKit::SDL::PipelineBuilder::build | ( | SDL_GPUDevice * | device | ) | -> SDL_GPUGraphicsPipeline* |
SDL_GPUDevice Definition at line 56 of file PipelineBuilder.cpp.
| auto sKit::SDL::PipelineBuilder::cullMode | ( | SDL_GPUCullMode | cullMode | ) | -> PipelineBuilder& |
Definition at line 51 of file PipelineBuilder.cpp.
| auto sKit::SDL::PipelineBuilder::shaders | ( | SDL_GPUShader * | vertexShader, |
| SDL_GPUShader * | fragmentShader | ||
| ) | -> PipelineBuilder& |
Tells the builder which shaders it should use to create the pipeline.
Definition at line 9 of file PipelineBuilder.cpp.