cae  0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
cae::GLSL Class Referencefinal

Class for the GLSL plugin. More...

#include <GLSL.hpp>

+ Inheritance diagram for cae::GLSL:
+ Collaboration diagram for cae::GLSL:

Public Member Functions

 GLSL ()=default
 
 ~GLSL () override=default
 
 GLSL (const GLSL &)=delete
 
GLSLoperator= (const GLSL &)=delete
 
 GLSL (GLSL &&)=delete
 
GLSLoperator= (GLSL &&)=delete
 
std::string getName () const override
 Get the name of the plugin.
 
utl::PluginType getType () const override
 Get the type of the plugin.
 
utl::PluginPlatform getPlatform () const override
 Get the handled platform of the plugin.
 
ShaderSourceType sourceType () const override
 Get the source type this frontend handles.
 
ShaderIRModule compile (const ShaderSourceDesc &desc) override
 Compile shader source to intermediate representation.
 
- Public Member Functions inherited from cae::AShaderFrontend
 ~AShaderFrontend () override=default
 
- Public Member Functions inherited from cae::IShaderFrontend
 ~IShaderFrontend () override=default
 
- Public Member Functions inherited from utl::IPlugin
virtual ~IPlugin ()=default
 

Static Private Member Functions

static EShLanguage shaderStageToESh (const ShaderStage stage)
 
static std::vector< uint32_t > compileGLSLtoSPIRV (const std::string &src, ShaderStage stage)
 

Detailed Description

Class for the GLSL plugin.

Definition at line 25 of file GLSL.hpp.

Constructor & Destructor Documentation

◆ GLSL() [1/3]

cae::GLSL::GLSL ( )
default

◆ ~GLSL()

cae::GLSL::~GLSL ( )
overridedefault

◆ GLSL() [2/3]

cae::GLSL::GLSL ( const GLSL & )
delete

◆ GLSL() [3/3]

cae::GLSL::GLSL ( GLSL && )
delete

Member Function Documentation

◆ compile()

ShaderIRModule cae::GLSL::compile ( const ShaderSourceDesc & desc)
inlineoverridevirtual

Compile shader source to intermediate representation.

Parameters
descShader source description
Returns
Compiled shader intermediate representation module

Implements cae::IShaderFrontend.

Definition at line 43 of file GLSL.hpp.

References compileGLSLtoSPIRV(), cae::ShaderIRModule::entryPoint, cae::ShaderIRModule::id, cae::ShaderSourceDesc::id, cae::ShaderSourceDesc::source, cae::ShaderIRModule::spirv, cae::ShaderIRModule::stage, and cae::ShaderSourceDesc::stage.

+ Here is the call graph for this function:

◆ compileGLSLtoSPIRV()

std::vector< uint32_t > cae::GLSL::compileGLSLtoSPIRV ( const std::string & src,
ShaderStage stage )
staticprivate

Definition at line 5 of file glsl.cpp.

References shaderStageToESh(), and cae::VERSION.

Referenced by compile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getName()

std::string cae::GLSL::getName ( ) const
inlinenodiscardoverridevirtual

Get the name of the plugin.

Returns
The name of the plugin

Implements utl::IPlugin.

Definition at line 37 of file GLSL.hpp.

◆ getPlatform()

utl::PluginPlatform cae::GLSL::getPlatform ( ) const
inlinenodiscardoverridevirtual

Get the handled platform of the plugin.

Returns
The handled platform of the plugin

Implements utl::IPlugin.

Definition at line 39 of file GLSL.hpp.

References utl::ALL.

◆ getType()

utl::PluginType cae::GLSL::getType ( ) const
inlinenodiscardoverridevirtual

Get the type of the plugin.

Returns
The type of the plugin

Implements utl::IPlugin.

Definition at line 38 of file GLSL.hpp.

References utl::SHADER_FRONTEND.

◆ operator=() [1/2]

GLSL & cae::GLSL::operator= ( const GLSL & )
delete

◆ operator=() [2/2]

GLSL & cae::GLSL::operator= ( GLSL && )
delete

◆ shaderStageToESh()

static EShLanguage cae::GLSL::shaderStageToESh ( const ShaderStage stage)
inlinestaticprivate

Definition at line 54 of file GLSL.hpp.

References cae::COMPUTE, cae::FRAGMENT, cae::GEOMETRY, and cae::VERTEX.

Referenced by compileGLSLtoSPIRV().

+ Here is the caller graph for this function:

◆ sourceType()

ShaderSourceType cae::GLSL::sourceType ( ) const
inlinenodiscardoverridevirtual

Get the source type this frontend handles.

Returns
The source type this frontend handles

Implements cae::IShaderFrontend.

Definition at line 41 of file GLSL.hpp.

References cae::GLSL.


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