![]() |
VPP
0.7
A high-level modern C++ API for Vulkan
|
Binding point class for tessellation control shaders. Place in your pipeline configuration class to declare a tessellation control shader. More...
#include <vppShader.hpp>
Public Member Functions | |
template<class ClassT , typename... Args> | |
tessControlShader (ClassT *pParentClass, void(ClassT::*fMethodDef)(TessControlShader *, Args...), Args... args) | |
Constructor. More... | |
void | setOutputPatchVertices (int v) |
Sets the number of control points in the resulting patch. More... | |
int | getOutputPatchVertices () const |
Retrieves the number of control points in the resulting patch. | |
void | setTopology (ETessellationTopology topology) |
Configures the topology of tessellation. | |
ETessellationTopology | getTopology () const |
Retrieves the topology of tessellation. | |
void | setSpacing (ETessellationSpacing spacing) |
Configures the spacing mode of tessellation. More... | |
ETessellationSpacing | getSpacing () const |
Retrieves the spacing mode of tessellation. More... | |
Binding point class for tessellation control shaders. Place in your pipeline configuration class to declare a tessellation control shader.
This class also contains several methods allowing to configure operation of the tessellator. Call them from your pipeline configuration class constructor.
Tessellation shaders are optional. If the tessellation control shader is present, the tessellation evaluation shader must also be present.
Example:
|
inline |
Constructor.
As the first parameter, put the pointer to parent PipelineConfig derived class. Usually it is the this
pointer, as the constructor is being called from the pipeline config class constructor.
The second argument is a pointer to member method implementing the shader.
Optionally there can be more user-defined arguments. They will be pased to the shader method unchanged.
ETessellationSpacing vpp::tessControlShader::getSpacing | ( | ) | const |
Retrieves the spacing mode of tessellation.
See the 21.3 section of official Vulkan docs for details.
void vpp::tessControlShader::setOutputPatchVertices | ( | int | v | ) |
Sets the number of control points in the resulting patch.
The tessellation control shader transforms input patch to an output patch.
The number of control points within the input patch is configured using the PipelineConfig::setTessPatchControlPoints() method. Call it from your PipelineConfig derived class constructor.
This method allows to configure how many control points the output patch will have.
void vpp::tessControlShader::setSpacing | ( | ETessellationSpacing | spacing | ) |
Configures the spacing mode of tessellation.
See the 21.3 section of official Vulkan docs for details.