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

Shader type enumeration. More...

#include <CeresEngine/Material/ShaderType.hpp>

Inheritance diagram for CeresEngine::ShaderType:
CeresEngine::StructEnum< ShaderType >

Public Types

enum  : UnderlyingType {
  Undefined = 0 , Vertex = (1u << 0u) , TesselationControl = (1u << 1u) , TesselationEvaluation = (1u << 2u) ,
  Geometry = (1u << 3u) , Fragment = (1u << 4u) , Compute = (1u << 5u) , Task = (1u << 6u) ,
  Mesh = (1u << 7u) , RayTracingRayGeneration = (1u << 8u) , RayTracingAnyHit = (1u << 9u) , RayTracingClosestHit = (1u << 10u) ,
  RayTracingMiss = (1u << 11u) , RayTracingIntersection = (1u << 12u) , RayTracingCallable = (1u << 13u)
}
 
using RawType = decltype(raw)
 
- Public Types inherited from CeresEngine::StructEnum< ShaderType >
using UnderlyingType = UInt32
 
using Self = ShaderType
 

Public Member Functions

constexpr ShaderType ()=default
 
constexpr ShaderType (RawType raw)
 
constexpr ShaderType (UnderlyingType raw)
 
StringView toString () const noexcept
 Gets a string representation of ShaderType.
 
ShaderStage getStageFlag () const noexcept
 
- Public Member Functions inherited from CeresEngine::StructEnum< ShaderType >
 operator UnderlyingType () const noexcept
 Converts the enum into it's underlying type.
 
void toString (std::ostream &stream) const noexcept
 Writes a string representation of the ShaderType to the given stream.
 

Static Public Member Functions

static Optional< ShaderTypefromString (StringView string) noexcept
 Creates a new ShaderType from a string representation.
 
- Static Public Member Functions inherited from CeresEngine::StructEnum< ShaderType >
static Self fromRawUnderlying (UnderlyingType underlying) noexcept
 Creates a new Self from it's underlying numeric representation.
 

Public Attributes

enum CeresEngine::ShaderType:: { ... }  raw
 

Static Public Attributes

static constexpr auto all
 

Detailed Description

Shader type enumeration.

Member Typedef Documentation

◆ RawType

Member Enumeration Documentation

◆ anonymous enum

Enumerator
Undefined 

Undefined shader type.

Vertex 

Vertex shader type.

TesselationControl 

Tessellation control shader type (also "Hull Shader").

TesselationEvaluation 

Tessellation evaluation shader type (also "Domain Shader").

Geometry 

Geometry shader type.

Fragment 

Fragment shader type (also "Pixel Shader").

Compute 

Compute shader type.

Task 

Task shader type.

Mesh 

Mesh shader type.

RayTracingRayGeneration 

Ray-tracing ray generation shader.

RayTracingAnyHit 

Ray-tracing ray hit shader.

RayTracingClosestHit 

Ray-tracing closest ray hit shader.

RayTracingMiss 

Ray-tracing ray miss shader.

RayTracingIntersection 

Ray-tracing ray intersection shader.

RayTracingCallable 

Ray-tracing callable shader.

Constructor & Destructor Documentation

◆ ShaderType() [1/3]

constexpr CeresEngine::ShaderType::ShaderType ( )
constexprdefault

◆ ShaderType() [2/3]

constexpr CeresEngine::ShaderType::ShaderType ( RawType  raw)
inlineconstexpr

◆ ShaderType() [3/3]

constexpr CeresEngine::ShaderType::ShaderType ( UnderlyingType  raw)
inlineexplicitconstexpr

Member Function Documentation

◆ fromString()

static Optional< ShaderType > CeresEngine::ShaderType::fromString ( StringView  string)
staticnoexcept

Creates a new ShaderType from a string representation.

If the string value is invalid, an empty optional is returned.

◆ getStageFlag()

ShaderStage CeresEngine::ShaderType::getStageFlag ( ) const
noexcept

◆ toString()

StringView CeresEngine::ShaderType::toString ( ) const
noexcept

Gets a string representation of ShaderType.

Member Data Documentation

◆ all

constexpr auto CeresEngine::ShaderType::all
staticconstexpr
Initial value:
= {
}
@ RayTracingRayGeneration
Ray-tracing ray generation shader.
Definition ShaderType.hpp:89
@ TesselationEvaluation
Tessellation evaluation shader type (also "Domain Shader").
Definition ShaderType.hpp:71
@ Mesh
Mesh shader type.
Definition ShaderType.hpp:86
@ RayTracingAnyHit
Ray-tracing ray hit shader.
Definition ShaderType.hpp:92
@ Task
Task shader type.
Definition ShaderType.hpp:83
@ Compute
Compute shader type.
Definition ShaderType.hpp:80
@ Geometry
Geometry shader type.
Definition ShaderType.hpp:74
@ RayTracingClosestHit
Ray-tracing closest ray hit shader.
Definition ShaderType.hpp:95
@ TesselationControl
Tessellation control shader type (also "Hull Shader").
Definition ShaderType.hpp:68
@ RayTracingCallable
Ray-tracing callable shader.
Definition ShaderType.hpp:104
@ Fragment
Fragment shader type (also "Pixel Shader").
Definition ShaderType.hpp:77
@ Vertex
Vertex shader type.
Definition ShaderType.hpp:65
@ RayTracingIntersection
Ray-tracing ray intersection shader.
Definition ShaderType.hpp:101
@ RayTracingMiss
Ray-tracing ray miss shader.
Definition ShaderType.hpp:98

◆ []

enum { ... } CeresEngine::ShaderType::raw

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