CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::UniformPacker Class Reference

Uniform packer is not a visitor in the conventional sense. More...

#include <CeresEngine/Material/ShaderCompiler/AST/Visitor/UniformPacker.hpp>

Classes

struct  CbufferAttributes
 

Public Member Functions

void convert (Program &program, const CbufferAttributes &cbufferAttribs={}, bool onlyReachableStatements=true)
 

Private Member Functions

void makeUniformBuffer ()
 
void appendUniform (const VarDeclarationStatementPtr &varDeclarationStatement)
 
bool canConvertUniformWithTypeDenoter (const TypeDenoter &typeDen) const
 

Private Attributes

CbufferAttributes mCbufferAttribs
 
UniformBufferDeclarationPtr mUniformBufferDeclaration
 
BasicDeclarationStatementPtr mDeclarationStatement
 

Detailed Description

Uniform packer is not a visitor in the conventional sense.

It only itertates over all global statements and moves all uniform declarations into a single uniform buffer.

Member Function Documentation

◆ appendUniform()

void CeresEngine::ShaderCompiler::UniformPacker::appendUniform ( const VarDeclarationStatementPtr varDeclarationStatement)
private

◆ canConvertUniformWithTypeDenoter()

bool CeresEngine::ShaderCompiler::UniformPacker::canConvertUniformWithTypeDenoter ( const TypeDenoter typeDen) const
private

◆ convert()

void CeresEngine::ShaderCompiler::UniformPacker::convert ( Program program,
const CbufferAttributes cbufferAttribs = {},
bool  onlyReachableStatements = true 
)

◆ makeUniformBuffer()

void CeresEngine::ShaderCompiler::UniformPacker::makeUniformBuffer ( )
private

Member Data Documentation

◆ mCbufferAttribs

CbufferAttributes CeresEngine::ShaderCompiler::UniformPacker::mCbufferAttribs
private

◆ mDeclarationStatement

BasicDeclarationStatementPtr CeresEngine::ShaderCompiler::UniformPacker::mDeclarationStatement
private

◆ mUniformBufferDeclaration

UniformBufferDeclarationPtr CeresEngine::ShaderCompiler::UniformPacker::mUniformBufferDeclaration
private

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