VPP  0.7
A high-level modern C++ API for Vulkan
vpp::LocalStruct< DefinitionT > Class Template Reference

Base class for local data structures. More...

#include <vppLangAggregates.hpp>

Detailed Description

template<class DefinitionT>
class vpp::LocalStruct< DefinitionT >

Base class for local data structures.

Inherit from this class to define your GPU local data structure.

Local data structures reside on GPU only and therefore are not associated with any CPU-side types. Objects of these types are never seen by CPU. As a result, type definition is simpler than in case of VertexStruct, InstanceStruct or UniformStruct.

The template argument should be the name of your template which is being derived.

Use Field template to define fields inside the structure.

Structures defined with LocalStruct are typically used with ioStructure binding points, to define inter-shader communication variables.

There is only GPU-side version of the structure, hence ETag is not used.

Example of type definition:

struct GStdPipelineData : public LocalStruct< GStdPipelineData >
{
Field< Vec4 > d_worldVertex;
Field< Vec4 > d_worldNormal;
Field< Vec4 > d_worldTangent;
Field< Vec4 > d_textureUV01;
Field< Vec4 > d_textureUV23;
Field< Vec4 > d_textureUV45;
Field< Vec4 > d_textureUV67;
Field< IVec4 > d_parameters;
};

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