VPP  0.7
A high-level modern C++ API for Vulkan
Public Member Functions | List of all members
vpp::tessControlShader Class Reference

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...
 

Detailed Description

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:

class MyPipelineConfig : public vpp::PipelineConfig
{
public:
MyPipelineConfig ( const vpp::Process& pr, const vpp::Device& dev );
void fTessControlShader ( vpp::TessControlShader* pShader );
vpp::tessControlShader m_tessControlShader;
};
MyPipelineConfig :: MyPipelineConfig ( const vpp::Process& pr, const vpp::Device& dev )
m_tessControlShader ( this, & MyPipelineConfig::fTessControlShader )
{
}

Constructor & Destructor Documentation

◆ tessControlShader()

template<class ClassT , typename... Args>
vpp::tessControlShader::tessControlShader ( ClassT *  pParentClass,
void(ClassT::*)(TessControlShader *, Args...)  fMethodDef,
Args...  args 
)
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.

Member Function Documentation

◆ getSpacing()

ETessellationSpacing vpp::tessControlShader::getSpacing ( ) const

Retrieves the spacing mode of tessellation.

See the 21.3 section of official Vulkan docs for details.

◆ setOutputPatchVertices()

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.

◆ setSpacing()

void vpp::tessControlShader::setSpacing ( ETessellationSpacing  spacing)

Configures the spacing mode of tessellation.

See the 21.3 section of official Vulkan docs for details.


The documentation for this class was generated from the following file: