Ocular Engine
Ocular::Graphics::MaterialEmpty Class Reference

Special default 'empty' Material. Typically used internally. More...

#include <MaterialEmpty.hpp>

Inheritance diagram for Ocular::Graphics::MaterialEmpty:
Ocular::Graphics::Material Ocular::Core::Resource Ocular::Core::ObjectIO Ocular::Core::Exposable Ocular::Core::Buildable

Public Member Functions

virtual void bind () override
 
virtual void unbind () override
 
virtual void unload () override
 
virtual void onLoad (Core::BuilderNode const *node) override
 
virtual void onSave (Core::BuilderNode *node) const override
 
- Public Member Functions inherited from Ocular::Graphics::Material
virtual bool setTexture (uint32_t index, std::string const &name, Texture *texture)
 
TexturegetTexture (uint32_t index) const
 
virtual void removeTexture (uint32_t index)
 
uint32_t getNumTextures () const
 
std::vector< TextureSamplerInfo > const * getTextures () const
 
bool setVertexShader (std::string const &name)
 
void setVertexShader (VertexShader *shader)
 
bool setGeometryShader (std::string const &name)
 
void setGeometryShader (GeometryShader *shader)
 
bool setFragmentShader (std::string const &name)
 
void setFragmentShader (FragmentShader *shader)
 
bool setPreTessellationShader (std::string const &name)
 
void setPreTessellationShader (PreTessellationShader *shader)
 
bool setPostTessellationShader (std::string const &name)
 
void setPostTessellationShader (PostTessellationShader *shader)
 
VertexShadergetVertexShader () const
 
GeometryShadergetGeometryShader () const
 
FragmentShadergetFragmentShader () const
 
PreTessellationShadergetPreTessellationShader () const
 
PostTessellationShadergetPostTessellationShader () const
 
virtual void setUniform (std::string const &name, uint32_t registerIndex, float value)
 
virtual bool getUniform (std::string const &name, float &value)
 
virtual void setUniform (std::string const &name, uint32_t registerIndex, Math::Vector4f const &value, std::string const &type=Utils::TypeName< Math::Vector4f >::name)
 
virtual bool getUniform (std::string const &name, Math::Vector4f &value)
 
virtual void setUniform (std::string const &name, uint32_t registerIndex, Math::Matrix3x3 const &value)
 
virtual bool getUniform (std::string const &name, Math::Matrix3x3 &value)
 
virtual void setUniform (std::string const &name, uint32_t registerIndex, Math::Matrix4x4 const &value)
 
virtual bool getUniform (std::string const &name, Math::Matrix4x4 &value)
 
UniformBuffer const * getUniformBuffer () const
 
void setPrimitiveStyle (PrimitiveStyle style)
 
PrimitiveStyle getPrimitiveStyle () const
 
void setFillMode (FillMode mode)
 
FillMode getFillMode () const
 
void setRenderPriority (uint32_t priority)
 
uint32_t getRenderPriority () const
 
- Public Member Functions inherited from Ocular::Core::Resource
 Resource (File const &source)
 
virtual void forceLoad ()
 
File getSourceFile () const
 
void setSourceFile (File const &file)
 
void setIsInMemory (bool inMemory)
 
bool isInMemory () const
 
void setSize (uint64_t size)
 
uint64_t getSize () const
 
ResourceType getResourceType () const
 
void setName (std::string const &name)
 
std::string const & getName () const
 
std::string const & getMappingName () const
 
void setMappingName (std::string const &name)
 
ResourceMetadatagetMetadata () const
 
void setMetadata (ResourceMetadata *metadata)
 
- Public Member Functions inherited from Ocular::Core::Exposable
void getAllExposedNames (std::vector< std::string > &names) const
 
bool getVariable (std::string const &name, ExposedVariable &var)
 
template<typename T >
bool getVariableValue (std::string const &name, T &var)
 
template<typename T >
bool setVariableValue (std::string const &name, T const &value)
 
virtual void onVariableModified (std::string const &varName)
 

Additional Inherited Members

- Static Public Attributes inherited from Ocular::Graphics::Material
static const std::string ShaderNodeName = "ShaderProgram"
 
static const std::string TextureNodeName = "Textures"
 
static const std::string UniformNodeName = "Uniforms"
 
static const std::string RenderStateNodeName = "RenderState"
 
- Protected Member Functions inherited from Ocular::Graphics::Material
void setDefaults ()
 
void bindShaders ()
 
void unbindShaders ()
 
void bindStateChanges ()
 
void unbindStateChanges ()
 
- Protected Member Functions inherited from Ocular::Core::Exposable
void exposeVariable (std::string const &name, std::string const &type, bool isPointer, bool isExposed, void *data)
 
- Protected Attributes inherited from Ocular::Graphics::Material
VertexShaderm_VertexShader
 
GeometryShaderm_GeometryShader
 
FragmentShaderm_FragmentShader
 
PreTessellationShaderm_PreTessellationShader
 
PostTessellationShaderm_PostTessellationShader
 
RasterState m_StoredRasterState
 
std::vector< TextureSamplerInfom_Textures
 
UniformBufferm_UniformBuffer
 
uint32_t m_RenderPriority
 
- Protected Attributes inherited from Ocular::Core::Resource
ResourceType m_Type
 
ResourceMetadatam_Metadata
 
File m_SourceFile
 
bool m_IsInMemory
 
uint64_t m_SizeInMemory
 
std::string m_Name
 
std::string m_MappingName
 
- Protected Attributes inherited from Ocular::Core::Exposable
std::unordered_map< std::string, ExposedVariablem_ExposedVariables
 

Detailed Description

Special default 'empty' Material. Typically used internally.

Member Function Documentation

void Ocular::Graphics::MaterialEmpty::onLoad ( Core::BuilderNode const *  node)
overridevirtual

Alternate creation method (opposed to the constructor) in which one is provided with a BuilderNode chain. This chain may be explored to retrieve any relevant variables, and their values, that may have been stored in it.

This method will typically mirror the onSave, in which relevant values are stored within the chain.

Parameters
[in]nodeNode to extract variable information from

Reimplemented from Ocular::Graphics::Material.

void Ocular::Graphics::MaterialEmpty::onSave ( Core::BuilderNode node) const
overridevirtual

Method used to add an object's data to an existing node chain in preparation for being save to a file.

Parameters
[in]nodeNode to place variable information in

Reimplemented from Ocular::Graphics::Material.

void Ocular::Graphics::MaterialEmpty::unload ( )
overridevirtual

Frees all memory used by this Resource.

Reimplemented from Ocular::Graphics::Material.


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