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

Binding point class for geometry shaders. Place in your pipeline configuration class to declare a geometry shader. More...

#include <vppShader.hpp>

Public Member Functions

template<class ClassT , typename... Args>
 geometryShader (ClassT *pParentClass, void(ClassT::*fMethodDef)(GeometryShader *, Args...), Args... args)
 Constructor. More...
 
void setOutputTopology (EGeometryOutputTopology t)
 Configures the topology of primitives generated by the shader. More...
 
void setMaxOutputVertices (int value)
 Configures the maximum vertex count this shader can output.
 
void setInvocations (int inv)
 Enables multiple geometry shader invocations feature and sets the number of invocations. More...
 

Detailed Description

Binding point class for geometry shaders. Place in your pipeline configuration class to declare a geometry shader.

This class also contains several methods allowing to configure operation of the shader. Call them from your pipeline configuration class constructor.

Geometry shader is optional.

Example:

class MyPipelineConfig : public vpp::PipelineConfig
{
public:
MyPipelineConfig ( const vpp::Process& pr, const vpp::Device& dev );
void fGeometryShader ( vpp::GeometryShader* pShader );
vpp::geometryShader m_geometryShader;
};
MyPipelineConfig :: MyPipelineConfig ( const vpp::Process& pr, const vpp::Device& dev )
m_geometryShader ( this, & MyPipelineConfig::fGeometryShader )
{
}

Constructor & Destructor Documentation

◆ geometryShader()

template<class ClassT , typename... Args>
vpp::geometryShader::geometryShader ( ClassT *  pParentClass,
void(ClassT::*)(GeometryShader *, 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

◆ setInvocations()

void vpp::geometryShader::setInvocations ( int  inv)

Enables multiple geometry shader invocations feature and sets the number of invocations.

Call from your PipelineConfig derived class constructor.

The value of zero invocations disables the feature.

See section 22.3 of the official Vulkan docs for details.

◆ setOutputTopology()

void vpp::geometryShader::setOutputTopology ( EGeometryOutputTopology  t)

Configures the topology of primitives generated by the shader.

See section 22.2 of the official Vulkan docs for details.


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