XII Release 0.1.0
Loading...
Searching...
No Matches
xiiMaterialSchema Class Reference

#include <MaterialSchema.h>

Inheritance diagram for xiiMaterialSchema:
[legend]

Public Member Functions

xiiResult Build (const xiiMaterialSchemaDescription &description, xiiStringBuilder *out_pError=nullptr)
void Clear ()
bool IsValid () const
const xiiString & GetName () const
const xiiShaderResourceHandle & GetShader () const
xiiEnum< xiiMaterialDomain > GetDomain () const
xiiEnum< xiiMaterialShadingModel > GetShadingModel () const
xiiUInt32 GetVersion () const
xiiUInt32 GetParameterBlockSize () const
xiiUInt64 GetLayoutHash () const
xiiArrayPtr< const xiiMaterialParameterDefinition > GetParameters () const
xiiArrayPtr< const xiiMaterialTextureDefinition > GetTextures () const
const xiiMaterialParameterDefinition * FindParameter (xiiMaterialParameterId id) const
const xiiMaterialParameterDefinition * FindParameter (const xiiTempHashedString &sName) const
const xiiMaterialTextureDefinition * FindTexture (xiiMaterialParameterId id) const
const xiiMaterialTextureDefinition * FindTexture (const xiiTempHashedString &sName) const
xiiUInt32 FindParameterIndex (xiiMaterialParameterId id) const
xiiUInt32 FindTextureIndex (xiiMaterialParameterId id) const
Public Member Functions inherited from xiiRefCounted
virtual ~xiiRefCounted ()=default
 Adds a virtual destructor.
Public Member Functions inherited from xiiRefCountingImpl
 xiiRefCountingImpl ()=default
 Constructor.
 xiiRefCountingImpl (const xiiRefCountingImpl &rhs)
void operator= (const xiiRefCountingImpl &rhs)
xiiUInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
bool TryAddRef () const
xiiUInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.ywat.
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
xiiUInt32 GetRefCount () const
 Returns the current reference count.

Static Public Member Functions

static xiiUInt32 GetPackedSize (xiiMaterialParameterType::Enum type)
static xiiUInt32 GetPackedAlignment (xiiMaterialParameterType::Enum type)
static bool IsValueCompatible (xiiMaterialParameterType::Enum type, const xiiVariant &value)

Detailed Description

Validated, densely packed contract shared by material resources and runtime instances.

Schemas are immutable after Build(). Stable IDs remove hashed-string lookup from hot paths, while retaining names and reflected metadata for editors and diagnostics.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Material/MaterialSchema.h
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Material/Implementation/MaterialSchema.cpp