3#include <Core/ResourceManager/Resource.h>
4#include <Foundation/Containers/HashTable.h>
5#include <Foundation/Strings/HashedString.h>
6#include <RendererCore/Declarations.h>
7#include <RendererCore/Pipeline/RenderData.h>
8#include <RendererCore/Shader/ConstantBufferStorage.h>
9#include <RendererCore/Shader/ShaderResource.h>
22 PL_FORCE_INLINE
bool operator==(
const Parameter& other)
const {
return m_Name == other.m_Name && m_Value == other.m_Value; }
30 PL_FORCE_INLINE
bool operator==(
const Texture2DBinding& other)
const {
return m_Name == other.m_Name && m_Value == other.m_Value; }
38 PL_FORCE_INLINE
bool operator==(
const TextureCubeBinding& other)
const {
return m_Name == other.m_Name && m_Value == other.m_Value; }
72 void SetParameter(
const char* szName,
const plVariant& value);
86 void PreserveCurrentDesc();
103 static const char* GetDefaultMaterialFileName(DefaultMaterialType materialType);
115 PL_MAKE_SUBSYSTEM_STARTUP_FRIEND(RendererCore, MaterialResource);
125 plInt32 m_iLastUpdated;
126 plInt32 m_iLastConstantsUpdated;
129 bool AreConstantsModified();
147 plUInt32 m_uiCacheIndex;
148 CachedValues* m_pCachedValues;
150 CachedValues* GetOrUpdateCachedValues();
151 static CachedValues* AllocateCache(plUInt32& inout_uiCacheIndex);
152 static void DeallocateCache(plUInt32 uiCacheIndex);
157 static void ClearCache();
Definition ConstantBufferStorage.h:54
Definition DynamicArray.h:81
Definition HashTable.h:333
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
Definition MaterialResource.h:59
DefaultMaterialType
Use these enum values together with GetDefaultMaterialFileName() to get the default file names for th...
Definition MaterialResource.h:93
Provides a simple mechanism for mutual exclusion to prevent multiple threads from accessing a shared ...
Definition Mutex.h:13
Definition RenderContext.h:30
The base class for all resources.
Definition Resource.h:10
virtual plResourceLoadDesc UnloadData(Unload WhatToUnload)=0
Requests the resource to unload another quality level. If bFullUnload is true, the resource should un...
virtual void ResetResource()
If the resource has modifications from the original state, it should reset itself to that state now (...
Definition Resource.h:128
virtual plResourceLoadDesc UpdateContent(plStreamReader *pStream)=0
Called whenever more data for the resource is available. The resource must read the stream to update ...
virtual void UpdateMemoryUsage(MemoryUsage &out_NewMemoryUsage)=0
This function must be overridden by all resource types.
Definition ShaderPermutationResource.h:18
Interface for binary in (read) streams.
Definition Stream.h:22
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A class to use together with plHashedString for quick comparisons with temporary strings that need no...
Definition HashedString.h:151
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
Definition MaterialResource.h:18
Definition MaterialResource.h:26
Definition MaterialResource.h:34
Definition MaterialResource.h:16
Definition RenderData.h:19
These events may be sent by a specific plResource or by the plResourceManager.
Definition Declarations.h:22
Describes in which loading state a resource currently is, and how many different quality levels there...
Definition Declarations.h:102