luna engine
software engine
Loading...
Searching...
No Matches
luna::utils::shaderCompiler Class Reference

#include <shaderCompiler.h>

Public Member Functions

 shaderCompiler ()
 constructor does nothing at the moment. More...
 
virtual ~shaderCompiler ()
 
std::vector< uint32_t > compile (compileSpec compileSpec)
 compile a shader from source GLSL to specified. More...
 

Private Member Functions

bool reflect (const std::vector< uint32_t > &shaderData, bool reflect)
 reflects on the compiled shader and shows a text based dissasambly of the shader. More...
 
std::string getResourceTypeName (const spirv_cross::Resource &resource, const spirv_cross::Compiler &compiler)
 returns the resource type name ex mat4 returns "Mat4". More...
 

Constructor & Destructor Documentation

◆ shaderCompiler()

luna::utils::shaderCompiler::shaderCompiler ( )

constructor does nothing at the moment.

◆ ~shaderCompiler()

virtual luna::utils::shaderCompiler::~shaderCompiler ( )
inlinevirtual

Member Function Documentation

◆ compile()

std::vector< uint32_t > luna::utils::shaderCompiler::compile ( compileSpec  compileSpec)

compile a shader from source GLSL to specified.

Parameters
compileSpecstruct with compile specifications
Returns
compiled shadersource.

◆ getResourceTypeName()

std::string luna::utils::shaderCompiler::getResourceTypeName ( const spirv_cross::Resource &  resource,
const spirv_cross::Compiler &  compiler 
)
private

returns the resource type name ex mat4 returns "Mat4".

Parameters
resourceto get the typename of.
compilerthe compiler wich contains the compiled shader.
Returns
the type name of the resource as an std::string.

◆ reflect()

bool luna::utils::shaderCompiler::reflect ( const std::vector< uint32_t > &  shaderData,
bool  reflect 
)
private

reflects on the compiled shader and shows a text based dissasambly of the shader.

Parameters
shaderDatacompiled shaderData.
reflectreflect yes or no.
Returns
param reflect.

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