CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUShaderDescriptor Struct Referencefinal

Shader source and binary code descriptor structure. More...

#include <CeresEngine/RenderAPI/GPUShader.hpp>

Public Member Functions

 GPUShaderDescriptor ()=default
 
 GPUShaderDescriptor (const GPUShaderDescriptor &)=default
 
GPUShaderDescriptoroperator= (const GPUShaderDescriptor &)=default
 
 GPUShaderDescriptor (const ShaderType type, String source)
 Constructor to initialize the shader descriptor with a source.
 
 GPUShaderDescriptor (const ShaderType type, String source, String profile)
 Constructor to initialize the shader descriptor with a type, source and profile.
 
 GPUShaderDescriptor (const ShaderBinary &binary)
 Constructor to initialize the shader descriptor with a binary.
 
 GPUShaderDescriptor (const ShaderSource &source)
 Constructor to initialize the shader descriptor with a source.
 

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Public Attributes

ShaderType type = ShaderType::Undefined
 Specifies the type of the shader, i.e.
 
String source = ""
 Pointer to the shader source.
 
ShaderSourceType sourceType = ShaderSourceType::Binary
 Specifies the type of the shader source.
 
String profile = ""
 Shader target profile (e.g. "vs_5_0" for vertex shader model 5.0).
 
String name
 A user-facing name for the shader.
 

Detailed Description

Shader source and binary code descriptor structure.

Constructor & Destructor Documentation

◆ GPUShaderDescriptor() [1/6]

CeresEngine::GPUShaderDescriptor::GPUShaderDescriptor ( )
default

◆ GPUShaderDescriptor() [2/6]

CeresEngine::GPUShaderDescriptor::GPUShaderDescriptor ( const GPUShaderDescriptor )
default

◆ GPUShaderDescriptor() [3/6]

CeresEngine::GPUShaderDescriptor::GPUShaderDescriptor ( const ShaderType  type,
String  source 
)
inline

Constructor to initialize the shader descriptor with a source.

◆ GPUShaderDescriptor() [4/6]

CeresEngine::GPUShaderDescriptor::GPUShaderDescriptor ( const ShaderType  type,
String  source,
String  profile 
)
inline

Constructor to initialize the shader descriptor with a type, source and profile.

◆ GPUShaderDescriptor() [5/6]

CeresEngine::GPUShaderDescriptor::GPUShaderDescriptor ( const ShaderBinary binary)
inline

Constructor to initialize the shader descriptor with a binary.

◆ GPUShaderDescriptor() [6/6]

CeresEngine::GPUShaderDescriptor::GPUShaderDescriptor ( const ShaderSource source)
inline

Constructor to initialize the shader descriptor with a source.

Member Function Documentation

◆ operator=()

GPUShaderDescriptor & CeresEngine::GPUShaderDescriptor::operator= ( const GPUShaderDescriptor )
default

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::GPUShaderDescriptor::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

Member Data Documentation

◆ name

String CeresEngine::GPUShaderDescriptor::name

A user-facing name for the shader.

This is only used for debugging.

◆ profile

String CeresEngine::GPUShaderDescriptor::profile = ""

Shader target profile (e.g. "vs_5_0" for vertex shader model 5.0).

◆ source

String CeresEngine::GPUShaderDescriptor::source = ""

Pointer to the shader source.

This is either a null terminated string or a raw byte buffer (depending on the 'sourceType' member).

◆ sourceType

ShaderSourceType CeresEngine::GPUShaderDescriptor::sourceType = ShaderSourceType::Binary

Specifies the type of the shader source.

By default ShaderSourceType::CodeFile.

◆ type

ShaderType CeresEngine::GPUShaderDescriptor::type = ShaderType::Undefined

Specifies the type of the shader, i.e.

if it is either a vertex or fragment shader or the like. By default ShaderType::Undefined.


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