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

#include <MaterialGL.h>

Inheritance diagram for Graphics::OGL::Material:
Inheritance graph
[legend]
Collaboration diagram for Graphics::OGL::Material:
Collaboration graph
[legend]

Public Member Functions

 Material ()
 
virtual bool IsProgramLoaded () const override final
 
virtual void SetShader (Shader *p)
 
virtual const ShaderGetShader () const
 
virtual bool SetTexture (size_t name, Texture *tex) override
 
virtual bool SetBufferDynamic (size_t name, void *buffer, size_t size) override
 
virtual bool SetBuffer (size_t name, BufferBinding< Graphics::UniformBuffer > ub) override
 
virtual bool SetPushConstant (size_t name, int i) override
 
virtual bool SetPushConstant (size_t name, float f) override
 
virtual bool SetPushConstant (size_t name, vector3f v3) override
 
virtual bool SetPushConstant (size_t name, vector3f v4, float f4) override
 
virtual bool SetPushConstant (size_t name, Color c) override
 
virtual bool SetPushConstant (size_t name, matrix3x3f mat3) override
 
virtual bool SetPushConstant (size_t name, matrix4x4f mat4) override
 
- Public Member Functions inherited from Graphics::Material
 Material ()
 
virtual ~Material ()
 
const MaterialDescriptorGetDescriptor () const
 
virtual bool IsProgramLoaded () const =0
 
virtual bool SetTexture (size_t hash, Texture *tex)=0
 
virtual bool SetBufferDynamic (size_t hash, void *buffer, size_t size)=0
 
template<typename T >
bool SetBufferDynamic (size_t hash, T *buffer)
 
virtual bool SetBuffer (size_t hash, BufferBinding< UniformBuffer > uboBinding)=0
 
virtual bool SetPushConstant (size_t hash, int i)=0
 
virtual bool SetPushConstant (size_t hash, float f)=0
 
virtual bool SetPushConstant (size_t hash, vector3f v3)=0
 
virtual bool SetPushConstant (size_t hash, vector3f v4, float f4)=0
 
virtual bool SetPushConstant (size_t hash, Color c)=0
 
virtual bool SetPushConstant (size_t hash, matrix3x3f mat3)=0
 
virtual bool SetPushConstant (size_t hash, matrix4x4f mat4)=0
 
- Public Member Functions inherited from RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
void IncRefCount () const
 
void DecRefCount () const
 
int GetRefCount () const
 
- Public Member Functions inherited from LuaWrappable
virtual ~LuaWrappable ()
 

Protected Member Functions

void Copy (OGL::Material *to) const
 
ProgramEvaluateVariant ()
 
void UpdateDrawData ()
 

Protected Attributes

Shaderm_shader
 
Programm_activeVariant
 
RendererOGLm_renderer
 
uint32_t m_perDrawBinding
 
std::unique_ptr< char[]> m_pushConstants
 
std::unique_ptr< Texture *[]> m_textureBindings
 
std::unique_ptr< BufferBinding< UniformBuffer >[]> m_bufferBindings
 
- Protected Attributes inherited from Graphics::Material
MaterialDescriptor m_descriptor
 
size_t m_renderStateHash
 

Friends

class Graphics::RendererOGL
 
class OGL::CommandList
 

Additional Inherited Members

- Public Attributes inherited from Graphics::Material
Color diffuse
 
Color specular
 
Color emissive
 
float shininess
 

Constructor & Destructor Documentation

◆ Material()

Graphics::OGL::Material::Material ( )
inline

Member Function Documentation

◆ Copy()

void Graphics::OGL::Material::Copy ( OGL::Material to) const
protected
Here is the call graph for this function:

◆ EvaluateVariant()

Program * Graphics::OGL::Material::EvaluateVariant ( )
protected
Here is the call graph for this function:

◆ GetShader()

virtual const Shader * Graphics::OGL::Material::GetShader ( ) const
inlinevirtual

◆ IsProgramLoaded()

bool Graphics::OGL::Material::IsProgramLoaded ( ) const
finaloverridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ SetBuffer()

bool Graphics::OGL::Material::SetBuffer ( size_t  name,
BufferBinding< Graphics::UniformBuffer ub 
)
overridevirtual

Implements Graphics::Material.

◆ SetBufferDynamic()

bool Graphics::OGL::Material::SetBufferDynamic ( size_t  name,
void *  buffer,
size_t  size 
)
overridevirtual

Implements Graphics::Material.

◆ SetPushConstant() [1/7]

bool Graphics::OGL::Material::SetPushConstant ( size_t  name,
Color  c 
)
overridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ SetPushConstant() [2/7]

bool Graphics::OGL::Material::SetPushConstant ( size_t  name,
float  f 
)
overridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ SetPushConstant() [3/7]

bool Graphics::OGL::Material::SetPushConstant ( size_t  name,
int  i 
)
overridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ SetPushConstant() [4/7]

bool Graphics::OGL::Material::SetPushConstant ( size_t  name,
matrix3x3f  mat3 
)
overridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ SetPushConstant() [5/7]

bool Graphics::OGL::Material::SetPushConstant ( size_t  name,
matrix4x4f  mat4 
)
overridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ SetPushConstant() [6/7]

bool Graphics::OGL::Material::SetPushConstant ( size_t  name,
vector3f  v3 
)
overridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ SetPushConstant() [7/7]

bool Graphics::OGL::Material::SetPushConstant ( size_t  name,
vector3f  v4,
float  f4 
)
overridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ SetShader()

void Graphics::OGL::Material::SetShader ( Shader p)
virtual
Here is the call graph for this function:

◆ SetTexture()

bool Graphics::OGL::Material::SetTexture ( size_t  name,
Texture tex 
)
overridevirtual

Implements Graphics::Material.

Here is the call graph for this function:

◆ UpdateDrawData()

void Graphics::OGL::Material::UpdateDrawData ( )
protected
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ Graphics::RendererOGL

friend class Graphics::RendererOGL
friend

◆ OGL::CommandList

friend class OGL::CommandList
friend

Member Data Documentation

◆ m_activeVariant

Program* Graphics::OGL::Material::m_activeVariant
protected

◆ m_bufferBindings

std::unique_ptr<BufferBinding<UniformBuffer>[]> Graphics::OGL::Material::m_bufferBindings
protected

◆ m_perDrawBinding

uint32_t Graphics::OGL::Material::m_perDrawBinding
protected

◆ m_pushConstants

std::unique_ptr<char[]> Graphics::OGL::Material::m_pushConstants
protected

◆ m_renderer

RendererOGL* Graphics::OGL::Material::m_renderer
protected

◆ m_shader

Shader* Graphics::OGL::Material::m_shader
protected

◆ m_textureBindings

std::unique_ptr<Texture *[]> Graphics::OGL::Material::m_textureBindings
protected

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