Pioneer
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
Graphics::OGL::Shader Class Reference

#include <Shader.h>

Collaboration diagram for Graphics::OGL::Shader:
Collaboration graph
[legend]

Public Member Functions

 Shader ()
 
 Shader (const std::string &name)
 
virtual ~Shader ()
 
void Reload ()
 
ProgramGetProgramForDesc (const MaterialDescriptor &desc)
 
uint32_t GetNumVariants () const
 
TextureBindingData GetTextureBindingInfo (size_t name) const
 
size_t GetNumTextureBindings () const
 
const std::vector< TextureBindingData > & GetTextureBindings () const
 
PushConstantData GetPushConstantInfo (size_t name) const
 
size_t GetConstantStorageSize () const
 
size_t GetNumPushConstants () const
 
const std::vector< PushConstantData > & GetPushConstantBindings () const
 
BufferBindingData GetBufferBindingInfo (size_t name) const
 
size_t GetNumBufferBindings () const
 
const std::vector< BufferBindingData > & GetBufferBindings () const
 
const std::string & GetString (size_t name) const
 

Static Public Attributes

static constexpr GLuint InvalidBinding = UINT32_MAX
 

Protected Member Functions

std::string GetProgramDefines (const MaterialDescriptor &desc)
 
ProgramLoadProgram (const MaterialDescriptor &desc)
 
size_t AddTextureBinding (const std::string &name, TextureType type, uint32_t binding)
 
size_t AddConstantBinding (const std::string &name, ConstantDataFormat format, uint32_t binding)
 
size_t AddBufferBinding (const std::string &name, uint32_t binding)
 

Protected Attributes

ProgramDef m_programDef
 
uint32_t m_constantStorageSize
 
std::vector< std::pair< MaterialDescriptor, Program * > > m_variants
 
std::vector< TextureBindingDatam_textureBindingInfo
 
std::vector< PushConstantDatam_pushConstantInfo
 
std::vector< BufferBindingDatam_bufferBindingInfo
 
std::map< size_t, std::string > m_nameMap
 

Friends

class Program
 

Constructor & Destructor Documentation

◆ Shader() [1/2]

Shader::Shader ( )

◆ Shader() [2/2]

Shader::Shader ( const std::string &  name)
Here is the call graph for this function:

◆ ~Shader()

Shader::~Shader ( )
virtual

Member Function Documentation

◆ AddBufferBinding()

size_t Shader::AddBufferBinding ( const std::string &  name,
uint32_t  binding 
)
protected
Here is the call graph for this function:

◆ AddConstantBinding()

size_t Shader::AddConstantBinding ( const std::string &  name,
ConstantDataFormat  format,
uint32_t  binding 
)
protected
Here is the call graph for this function:

◆ AddTextureBinding()

size_t Shader::AddTextureBinding ( const std::string &  name,
TextureType  type,
uint32_t  binding 
)
protected
Here is the call graph for this function:

◆ GetBufferBindingInfo()

BufferBindingData Shader::GetBufferBindingInfo ( size_t  name) const
Here is the call graph for this function:

◆ GetBufferBindings()

const std::vector< BufferBindingData > & Graphics::OGL::Shader::GetBufferBindings ( ) const
inline

◆ GetConstantStorageSize()

size_t Graphics::OGL::Shader::GetConstantStorageSize ( ) const
inline

◆ GetNumBufferBindings()

size_t Graphics::OGL::Shader::GetNumBufferBindings ( ) const
inline

◆ GetNumPushConstants()

size_t Graphics::OGL::Shader::GetNumPushConstants ( ) const
inline

◆ GetNumTextureBindings()

size_t Graphics::OGL::Shader::GetNumTextureBindings ( ) const
inline

◆ GetNumVariants()

uint32_t Graphics::OGL::Shader::GetNumVariants ( ) const
inline

◆ GetProgramDefines()

std::string Shader::GetProgramDefines ( const MaterialDescriptor desc)
protected
Here is the call graph for this function:

◆ GetProgramForDesc()

Program * Shader::GetProgramForDesc ( const MaterialDescriptor desc)
Here is the call graph for this function:

◆ GetPushConstantBindings()

const std::vector< PushConstantData > & Graphics::OGL::Shader::GetPushConstantBindings ( ) const
inline

◆ GetPushConstantInfo()

PushConstantData Shader::GetPushConstantInfo ( size_t  name) const
Here is the call graph for this function:

◆ GetString()

const std::string & Graphics::OGL::Shader::GetString ( size_t  name) const
inline

◆ GetTextureBindingInfo()

TextureBindingData Shader::GetTextureBindingInfo ( size_t  name) const
Here is the call graph for this function:

◆ GetTextureBindings()

const std::vector< TextureBindingData > & Graphics::OGL::Shader::GetTextureBindings ( ) const
inline

◆ LoadProgram()

Program * Shader::LoadProgram ( const MaterialDescriptor desc)
protected
Here is the call graph for this function:

◆ Reload()

void Shader::Reload ( )
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ Program

friend class Program
friend

Member Data Documentation

◆ InvalidBinding

constexpr GLuint Graphics::OGL::Shader::InvalidBinding = UINT32_MAX
staticconstexpr

◆ m_bufferBindingInfo

std::vector<BufferBindingData> Graphics::OGL::Shader::m_bufferBindingInfo
protected

◆ m_constantStorageSize

uint32_t Graphics::OGL::Shader::m_constantStorageSize
protected

◆ m_nameMap

std::map<size_t, std::string> Graphics::OGL::Shader::m_nameMap
protected

◆ m_programDef

ProgramDef Graphics::OGL::Shader::m_programDef
protected

◆ m_pushConstantInfo

std::vector<PushConstantData> Graphics::OGL::Shader::m_pushConstantInfo
protected

◆ m_textureBindingInfo

std::vector<TextureBindingData> Graphics::OGL::Shader::m_textureBindingInfo
protected

◆ m_variants

std::vector<std::pair<MaterialDescriptor, Program *> > Graphics::OGL::Shader::m_variants
protected

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