HatchitGraphics
Public Member Functions | Protected Attributes | Friends | List of all members
Hatchit::Graphics::MaterialBase Class Referenceabstract
Inheritance diagram for Hatchit::Graphics::MaterialBase:
Hatchit::Graphics::DX::D3D12Material Hatchit::Graphics::Vulkan::VKMaterial

Public Member Functions

bool SetInt (size_t chunk, size_t offset, int data)
 Sets an integer that should be sent to the Material's pipeline when the material is bound. More...
 
bool SetFloat (size_t chunk, size_t offset, float data)
 Sets a float that should be sent to the Material's pipeline when the material is bound. More...
 
bool SetFloat3 (size_t chunk, size_t offset, Math::Vector3 data)
 Sets a Float3/Math::Vector3 that should be sent to the Material's pipeline when the material is bound. More...
 
bool SetFloat4 (size_t chunk, size_t offset, Math::Vector4 data)
 Sets a Float4/Math::Vector4 that should be sent to the Material's pipeline when the material is bound. More...
 
bool SetMatrix4 (size_t chunk, size_t offset, Math::Matrix4 data)
 Sets a Float16/Math::Vector4 that should be sent to the Material's pipeline when the material is bound. More...
 
virtual bool VBindTexture (std::string name, TextureHandle texture)=0
 
virtual bool VUnbindTexture (std::string name, TextureHandle texture)=0
 
virtual bool VUpdate ()=0
 
virtual PipelineHandle const VGetPipeline () const =0
 

Protected Attributes

std::vector< Core::Handle< RenderPass > > m_renderPasses
 
std::vector< LayoutLocationm_shaderVariableLocations
 
std::vector< ShaderVariableChunk * > m_shaderVariables
 

Friends

class Material
 

Member Function Documentation

bool Hatchit::Graphics::MaterialBase::SetFloat ( size_t  chunk,
size_t  offset,
float  data 
)

Sets a float that should be sent to the Material's pipeline when the material is bound.

Parameters
chunkThe index describing which ShaderVariableChunk this data should be placed in
offsetThe offset describing how far into the chunk the data should be placed
dataThe data to actually insert into the material's shader info
Returns
A boolean representing whether or not this operation succeeded
bool Hatchit::Graphics::MaterialBase::SetFloat3 ( size_t  chunk,
size_t  offset,
Math::Vector3  data 
)

Sets a Float3/Math::Vector3 that should be sent to the Material's pipeline when the material is bound.

Parameters
chunkThe index describing which ShaderVariableChunk this data should be placed in
offsetThe offset describing how far into the chunk the data should be placed
dataThe data to actually insert into the material's shader info
Returns
A boolean representing whether or not this operation succeeded
bool Hatchit::Graphics::MaterialBase::SetFloat4 ( size_t  chunk,
size_t  offset,
Math::Vector4  data 
)

Sets a Float4/Math::Vector4 that should be sent to the Material's pipeline when the material is bound.

Parameters
chunkThe index describing which ShaderVariableChunk this data should be placed in
offsetThe offset describing how far into the chunk the data should be placed
dataThe data to actually insert into the material's shader info
Returns
A boolean representing whether or not this operation succeeded
bool Hatchit::Graphics::MaterialBase::SetInt ( size_t  chunk,
size_t  offset,
int  data 
)

Sets an integer that should be sent to the Material's pipeline when the material is bound.

Parameters
chunkThe index describing which ShaderVariableChunk this data should be placed in
offsetThe offset describing how far into the chunk the data should be placed
dataThe data to actually insert into the material's shader info
Returns
A boolean representing whether or not this operation succeeded
bool Hatchit::Graphics::MaterialBase::SetMatrix4 ( size_t  chunk,
size_t  offset,
Math::Matrix4  data 
)

Sets a Float16/Math::Vector4 that should be sent to the Material's pipeline when the material is bound.

Parameters
chunkThe index describing which ShaderVariableChunk this data should be placed in
offsetThe offset describing how far into the chunk the data should be placed
dataThe data to actually insert into the material's shader info
Returns
A boolean representing whether or not this operation succeeded

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