}
/**
- * @brief Sets the color blend state
- * param[in] pointer to valid color blend state structure
- * @return reference to this structure
+ * @brief Set the program
+ *
+ * @param[in] value
+ * @return a reference to this structure
*/
- auto& SetColorBlendState(ColorBlendState* value)
+ auto& SetProgramState(ProgramState* value)
{
- colorBlendState = value;
+ programState = value;
return *this;
}
/**
- * @brief Sets the shader state for the pipeline
- *
- * The function takes an array of shader states in order to compile
- * the pipeline. Each ShaderState structure determines the pipeline stage
- * the shader should be executed on. The Shader object may be already created
- * with a specific stage. Then the ShaderState::inheritPipelineStage must be
- * set to true.
- *
- * Sample:
- * SetShaderState( { ShaderState().SetShader( vertexShader)
- * .SetPipelineStage( PipelineStage::VERTEX_SHADER ),
- * ShaderState().SetShader( fragmentShader )
- * .SetPipelineStage( PipelineStage::FRAGMENT_SHADER )
- * } );
- *
- * In modern graphics API it is possible to attach more than one Shader to a single
- * stage. For example, one Shader may be just a library of functions:
- * SetShaderState( { ShaderState().SetShader( vertexShader)
- * .SetPipelineStage( PipelineStage::VERTEX_SHADER ),
- * ShaderState().SetShader( shaderCommons )
- * .SetPipelineStage( PipelineStage::VERTEX_SHADER ),
- * ShaderState().SetShader( fragmentShader )
- * .SetPipelineStage( PipelineStage::FRAGMENT_SHADER )
- * } );
- *
- * The Pipeline will compile and link all given shaders.
- *
- * param[in] value Valid array of shder states
+ * @brief Sets the color blend state
+ * @param[in] value pointer to valid color blend state structure
* @return reference to this structure
*/
- auto& SetShaderState(const std::vector<ShaderState>& value)
+ auto& SetColorBlendState(ColorBlendState* value)
{
- shaderState = &value;
+ colorBlendState = value;
return *this;
}
/**
- * @brief Sets the viewport state
- * param[in] pointer to valid viewport state structure
+ * @brief Sets the viewport state.
+ *
+ * @param[in] value pointer to valid viewport state structure
* @return reference to this structure
*/
auto& SetViewportState(ViewportState* value)
}
/**
- * @brief Sets the framebuffer state
- * param[in] pointer to valid framebuffer state structure
- * @return reference to this structure
- */
- auto& SetFramebufferState(FramebufferState* value)
- {
- framebufferState = value;
- return *this;
- }
-
- /**
- * @brief Sets the base pipeline
+ * @brief Sets the base pipeline.
*
* Setting base pipeline allows inheriting that pipeline state
* and build the new pipeline from it. The base pipeline
* must stay valid until derived pipeline needs it.
*
- * param[in] pointer to valid pipeline object
+ * @param[in] value pointer to valid pipeline object
* @return reference to this structure
*/
auto& SetBasePipeline(Pipeline* value)
}
/**
- * @brief Sets the depth/stencil state
- * param[in] pointer to valid depth/stencil state structure
+ * @brief Sets the depth/stencil state.
+ *
+ * @param[in] pointer to valid depth/stencil state structure
* @return reference to this structure
*/
auto& SetDepthStencilState(DepthStencilState* value)
}
/**
- * @brief Sets the rasterization state
- * param[in] pointer to valid rasterization state structure
+ * @brief Sets the rasterization state.
+ *
+ * @param[in] pointer to valid rasterization state structure
* @return reference to this structure
*/
auto& SetRasterizationState(RasterizationState* value)
}
/**
- * @brief Sets the vertex input state
+ * @brief Sets the vertex input state.
*
* Vertex input state describes format of vertices and must
* be compatible with attached shaders.
*
- * param[in] pointer to vertex input state structure
+ * @param[in] pointer to vertex input state structure
* @return reference to this structure
*/
auto& SetVertexInputState(VertexInputState* value)
}
/**
- * @brief Sets the input assembly state
+ * @brief Sets the input assembly state.
*
* This state describes the topology of the pipeline.
*
- * param[in] pointer to valid input assembly state structure
+ * @param[in] pointer to valid input assembly state structure
* @return reference to this structure
*/
auto& SetInputAssemblyState(InputAssemblyState* value)
}
/**
- * @brief Sets the dynamic state mask
+ * @brief Sets the dynamic state mask.
*
* Certain states can be modified on fly without a need of
* creating new pipeline. The commands which modify particular
* states may be issued later by executing command buffers.
*
- * param[in] pointer to valid color blend state structure
+ * @param[in] pointer to valid color blend state structure
* @return reference to this structure
*/
auto& SetDynamicStateMask(PipelineDynamicStateMask value)
GraphicsStructureType type{GraphicsStructureType::PIPELINE_CREATE_INFO_STRUCT};
ExtensionCreateInfo* nextExtension{nullptr};
- ColorBlendState* colorBlendState{nullptr};
- const std::vector<ShaderState>* shaderState{nullptr};
- ViewportState* viewportState{nullptr};
- FramebufferState* framebufferState{nullptr};
- Pipeline* basePipeline{nullptr};
- DepthStencilState* depthStencilState{nullptr};
- RasterizationState* rasterizationState{nullptr};
- VertexInputState* vertexInputState{nullptr};
- InputAssemblyState* inputAssemblyState{nullptr};
- PipelineDynamicStateMask dynamicStateMask{0u};
+ ProgramState* programState{nullptr};
+ ColorBlendState* colorBlendState{nullptr};
+ ViewportState* viewportState{nullptr};
+ Pipeline* basePipeline{nullptr};
+ DepthStencilState* depthStencilState{nullptr};
+ RasterizationState* rasterizationState{nullptr};
+ VertexInputState* vertexInputState{nullptr};
+ InputAssemblyState* inputAssemblyState{nullptr};
+ PipelineDynamicStateMask dynamicStateMask{0u};
const AllocationCallbacks* allocationCallbacks{nullptr};
};