RavEngine
Loading...
Searching...
No Matches
RavEngine::MaterialInstance Struct Reference

#include <Material.hpp>

Inheritance diagram for RavEngine::MaterialInstance:
[legend]
Collaboration diagram for RavEngine::MaterialInstance:
[legend]

Public Member Functions

auto GetPriority () const
 
virtual const RGL::untyped_span GetPushConstantData () const
 
const auto & GetBufferBindings () const
 
const auto & GetTextureBindings () const
 
auto GetMat ()
 

Static Public Attributes

static constexpr uint8_t maxBindingSlots = 12
 

Protected Member Functions

 MaterialInstance (const decltype(mat)&m, const decltype(priority) p=0)
 

Protected Attributes

std::array< RGLBufferPtr, maxBindingSlots > bufferBindings
 
std::array< Ref< Texture >, maxBindingSlots > textureBindings
 
const uint32_t priority
 
MaterialVariant mat
 

Detailed Description

Represents the settings of a material. Subclass to expose more properties.

Member Function Documentation

◆ GetPushConstantData()

virtual const RGL::untyped_span RavEngine::MaterialInstance::GetPushConstantData ( ) const
inlinevirtual
Returns
a byte view to the push constant data for the material. The data is appended after the viewProj mat4. Returning a span of size 0, or with a nullptr pointer means that the material has no additional push constants.

Reimplemented in RavEngine::PBRMaterialInstance.


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