Cogs.Core
|
Effect resources contain data to control the shader stages of the GPU pipeline. More...
#include <Effect.h>
Public Member Functions | |
Effect ()=default | |
Default construct an Effect. | |
Effect (Effect &&other) noexcept=default | |
Move construct effect from other. | |
Effect & | operator= (Effect &&other) noexcept=default |
Move assign effect from other. | |
![]() | |
ResourceBase ()=default | |
Constructs a new resource base. | |
ResourceBase (const ResourceBase &other)=delete | |
Disable trivial copies of resources. | |
ResourceBase & | operator= (const ResourceBase &other)=delete |
Disable copy-assignment of resources. | |
ResourceBase (ResourceBase &&other) | |
Move constructs a resource base from other. | |
ResourceBase & | operator= (ResourceBase &&other) |
Move assign the resource from the given ResourceBase other. | |
~ResourceBase () | |
Destructs the resource. | |
void | setInitialized () |
void | setChanged () |
bool | hasChanged () const |
void | setLoading () |
void | setLoaded () |
void | setFailedLoad () |
void | setActive () |
void | setResident () |
void | setProxy () |
void | setKeepStorage () |
bool | isInitialized () const |
bool | isLoaded () const |
bool | isActive () const |
bool | isResident () const |
bool | isDependency () const |
bool | isDeleted () const |
bool | isOrphaned () const |
bool | isProxy () const |
bool | hasFailedLoad () const |
bool | hasFailedActivation () const |
bool | keepStorage () const |
void | setType (ResourceTypes type) |
Set the type enumeration of the resource. | |
ResourceTypes | getType () const |
Gets the type enumeration of the resource. | |
void | setId (ResourceId resourceId) |
Set the resource id of the resource. | |
ResourceId | getId () const |
Get the resource id of this instance. | |
void | setFlag (ResourceFlags flags) |
Set the given resource flag. | |
void | setFlags (ResourceFlags flags) |
void | unsetFlag (ResourceFlags flag) |
Unset the given flag. | |
bool | isSet (ResourceFlags flag) const |
Check if the given flag is currently set. | |
ResourceFlags | getFlags () const |
Get the current flags of the resource. | |
void | attachResource (RenderResource *attachment) |
Attach the given GPU resource to the resource. | |
bool | hasAttachedResource () const |
Check if the resource has an attachment. | |
RenderResource * | getAttachedResource () const |
Get the attached resource. | |
void | setOwner (IResourceManager *owner) |
Sets the owner of this resource instance. | |
IResourceManager * | getOwner () const |
void | setName (const StringView &name) |
Set the user friendly name of the resource. | |
StringView | getName () const |
Get the name of the resource. | |
void | setSource (const StringView &source) |
StringView | getSource () const |
void | increment () |
Increments the reference count of the resource. | |
void | decrement () |
Decrement the reference count of the resource. | |
uint32_t | referenceCount () const |
Get the current reference count. | |
void | incrementGeneration () |
Increment the generation count. | |
uint32_t | getGeneration () const |
Get the generation count. | |
void | setSlot (uint32_t slot) |
Sets the slot at which the resource is internally tracked. | |
uint32_t | getSlot () const |
Gets the slot where the resource is tracked internally. | |
Public Attributes | |
EffectDefinition | definition |
struct Material * | material = nullptr |
Owning material resource. | |
bool | delayLoad = false |
If the effect should be loaded or delayed. | |
Additional Inherited Members | |
![]() | |
static const uint32_t | NoAttachment = 0xFFFFFFFF |
Constant used to signal no attachment. | |
Effect resources contain data to control the shader stages of the GPU pipeline.
Effects are used in Materials in combination with material properties that are turned into input into the shaders, either through uniform variables or constant buffers.
Effects consist of one or more shaders, each able to bind to one of the shader stages.
Effect instances are loaded, processed and activated by the EffectManager.
EffectDefinition Cogs::Core::Effect::definition |
bool Cogs::Core::Effect::delayLoad = false |
struct Material* Cogs::Core::Effect::material = nullptr |
Owning material resource.
Definition at line 37 of file Effect.h.
Referenced by Cogs::Core::MaterialManager::loadMaterialVariant().