ezEngine  Milestone 9
ezMaterialResource Class Reference
Inheritance diagram for ezMaterialResource:

Public Member Functions

 ezMaterialResource ()
ezHashedString GetPermutationValue (const ezTempHashedString &sName)
ezHashedString GetSurface () const
void SetParameter (const ezHashedString &sName, const ezVariant &value)
void SetParameter (const char *szName, const ezVariant &value)
ezVariant GetParameter (const ezTempHashedString &sName)
void SetTexture2DBinding (const ezHashedString &sName, const ezTexture2DResourceHandle &value)
void SetTexture2DBinding (const char *szName, const ezTexture2DResourceHandle &value)
ezTexture2DResourceHandle GetTexture2DBinding (const ezTempHashedString &sName)
void SetTextureCubeBinding (const ezHashedString &sName, const ezTextureCubeResourceHandle &value)
void SetTextureCubeBinding (const char *szName, const ezTextureCubeResourceHandle &value)
ezTextureCubeResourceHandle GetTextureCubeBinding (const ezTempHashedString &sName)
void PreserveCurrentDesc ()
 Copies current desc to original desc so the material is not modified on reset.
virtual void ResetResource () override
 If the resource has modifications from the original state, it should reset itself to that state now (or force a reload on itself).
- Public Member Functions inherited from ezResource
EZ_ALWAYS_INLINE const ezStringGetResourceID () const
 Returns the unique ID that identifies this resource. On a file resource this might be a path. Can also be a GUID or any other scheme that uniquely identifies the resource.
EZ_ALWAYS_INLINE ezUInt32 GetResourceIDHash () const
 Returns the hash of the unique ID.
void SetResourceDescription (const char *szDescription)
 The resource description allows to store an additional string that might be more descriptive during debugging, than the unique ID.
const ezStringGetResourceDescription () const
 The resource description allows to store an additional string that might be more descriptive during debugging, than the unique ID.
EZ_ALWAYS_INLINE ezResourceState GetLoadingState () const
 Returns the current state in which this resource is in.
EZ_ALWAYS_INLINE ezUInt8 GetNumQualityLevelsDiscardable () const
 Returns the current maximum quality level that the resource could have. More...
EZ_ALWAYS_INLINE ezUInt8 GetNumQualityLevelsLoadable () const
 Returns how many quality levels the resource may additionally load.
void SetPriority (ezResourcePriority priority)
 Sets the current priority of this resource. More...
EZ_ALWAYS_INLINE ezResourcePriority GetPriority () const
 Returns the currently user-specified priority of this resource. More...
void SetDueDate (ezTime date=ezTime::Seconds(60.0 *60.0 *24.0 *365.0 *1000.0))
 Specifies the time (usually in the future) at which this resource is needed and should be fully loaded. More...
virtual ezTime GetLoadingDeadline (ezTime tNow) const
 Returns the deadline (tNow + x) at which this resource is required to be loaded. More...
EZ_ALWAYS_INLINE const ezBitflags< ezResourceFlags > & GetBaseResourceFlags () const
 Returns the basic flags for the resource type. Mostly used the resource manager.
EZ_ALWAYS_INLINE const MemoryUsageGetMemoryUsage () const
 Returns the information about the current memory usage of the resource.
EZ_ALWAYS_INLINE ezTime GetLastAcquireTime () const
 Returns the time at which the resource was (tried to be) acquired last. If a resource is acquired using ezResourceAcquireMode::PointerOnly, this does not update the last acquired time, since the resource is not acquired for full use.
EZ_ALWAYS_INLINE ezInt32 GetReferenceCount () const
 Returns the reference count of this resource.
EZ_ALWAYS_INLINE const ezTimestampGetLoadedFileModificationTime () const
 Returns the modification date of the file from which this resource was loaded. More...
EZ_ALWAYS_INLINE ezUInt32 GetCurrentResourceChangeCounter () const
 Returns the current value of the resource change counter. Can be used to detect whether the resource has changed since using it last time. More...
EZ_ALWAYS_INLINE void IncResourceChangeCounter ()
 Allows to manually increase the resource change counter to signal that dependent code might need to update.
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
EZ_ALWAYS_INLINE bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
template<typename T >
EZ_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.


class ezRenderContext

Additional Inherited Members

- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
- Public Attributes inherited from ezResource
ezEvent< const ezResourceEvent & > m_ResourceEvents
- Protected Types inherited from ezResource
enum  DoUpdate { OnMainThread, OnAnyThread }
enum  Unload { AllQualityLevels, OneQualityLevel }
- Protected Member Functions inherited from ezResource
 ezResource (DoUpdate ResourceUpdateThread, ezUInt8 uiQualityLevelsLoadable)
 Default constructor.
virtual ~ezResource ()
 virtual destructor.
MemoryUsageModifyMemoryUsage ()
 Non-const version for resources that want to write this variable directly.
void SetIsReloadable (bool bIsReloadable)
 Call this to specify whether a resource is reloadable. More...
void SetHasLoadingFallback (bool bHasLoadingFallback)
 Used internally by the code injection macros.

Constructor & Destructor Documentation

◆ ezMaterialResource()

ezMaterialResource::ezMaterialResource ( )
Should be done on any thread, but currently crashes when deleting custom loaders in the resource manager

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