Cogs.Core
Public Member Functions | Protected Attributes | List of all members
Cogs::Core::ComputeTask Struct Reference
Inheritance diagram for Cogs::Core::ComputeTask:
Cogs::Core::ProcessTask Cogs::Core::RenderTask

Public Member Functions

void initialize (RenderTaskContext *context) override
 
virtual void initialize (RenderTaskContext *context, const RenderTaskDefinition &taskDefinition)
 
void cleanup (RenderTaskContext *context) override
 
Cogs::ResourceStatus checkReady (RenderTaskContext *context) override
 Check if the task is ready to be applied, e.g.
 
void apply (RenderTaskContext *context) override
 
- Public Member Functions inherited from Cogs::Core::ProcessTask
EffectDescription createEffectDesc (RenderTaskContext *context)
 
void addProperty (ProcessTaskProperty &property)
 
virtual void initialize (RenderTaskContext *context) override
 
virtual void initialize (RenderTaskContext *context, const RenderTaskDefinition &taskDefinition)
 
void cleanup (RenderTaskContext *context) override
 
void setProperties (RenderTaskContext *context, Cogs::Core::RenderTexture *targetSource=nullptr)
 
- Public Member Functions inherited from Cogs::Core::RenderTask
virtual void initialize (RenderTaskContext *)
 
virtual void cleanup (RenderTaskContext *)
 
virtual void apply (RenderTaskContext *)=0
 
virtual Cogs::ResourceStatus checkReady (RenderTaskContext *)
 Check if the task is ready to be applied, e.g.
 
bool isStatic () const
 

Protected Attributes

Cogs::ResourceStatus effectStatus = Cogs::ResourceStatus::Pending
 

Additional Inherited Members

- Public Attributes inherited from Cogs::Core::ProcessTask
ParsedValue effectParameter
 
BlendMode blendMode = BlendMode::None
 
uint32_t texUnit = 0
 
ExpressionContextscope = nullptr
 
std::vector< ProcessTaskPropertyproperties
 
ProcessTaskProperty groups
 
struct CachedEffecteffect = nullptr
 
ConstantBufferDefinition paramBufferDesc
 
BufferHandle constantBuffer = BufferHandle::NoHandle
 
std::vector< uint8_t > constantBufferData
 
ConstantBufferBindingHandle paramBufferHandle = ConstantBufferBindingHandle::NoHandle
 
- Public Attributes inherited from Cogs::Core::RenderTask
RenderTaskResources input
 
RenderTaskResources output
 
std::string name
 
std::vector< std::string > dependencies
 
PipelineOptions options
 
RenderTaskFlags::ERenderTaskFlags flags = RenderTaskFlags::None
 
bool allowSelfDependency = false
 
size_t frameMod = 0
 
size_t frameOffset = 0
 
std::function< void(void)> deleter
 

Detailed Description

Definition at line 11 of file ComputeTask.h.

Constructor & Destructor Documentation

◆ ~ComputeTask()

virtual Cogs::Core::ComputeTask::~ComputeTask ( )
inlinevirtual

Definition at line 13 of file ComputeTask.h.

Member Function Documentation

◆ apply()

void Cogs::Core::ComputeTask::apply ( RenderTaskContext context)
overridevirtual

Implements Cogs::Core::RenderTask.

Definition at line 145 of file ComputeTask.cpp.

◆ checkReady()

Cogs::ResourceStatus Cogs::Core::ComputeTask::checkReady ( RenderTaskContext )
overridevirtual

Check if the task is ready to be applied, e.g.

that any effects it depends on have finished loading.

This is called unconditionally for every task, every frame, regardless of the readiness of other tasks - so that any pending loads triggered here get a chance to start as early as possible, instead of being serialized behind other tasks becoming ready first.

Returns
Cogs::ResourceStatus::Ready if apply() should be called this frame, Pending if the task should be retried next frame, or Error if the task has permanently failed.

Reimplemented from Cogs::Core::RenderTask.

Definition at line 131 of file ComputeTask.cpp.

References Cogs::IEffects::checkEffect(), Cogs::Error, Cogs::IGraphicsDevice::getEffects(), and Cogs::Core::HandleIsValid().

◆ cleanup()

void Cogs::Core::ComputeTask::cleanup ( RenderTaskContext context)
overridevirtual

Reimplemented from Cogs::Core::RenderTask.

Definition at line 126 of file ComputeTask.cpp.

◆ initialize() [1/2]

void Cogs::Core::ComputeTask::initialize ( RenderTaskContext context)
overridevirtual

Reimplemented from Cogs::Core::ProcessTask.

Definition at line 22 of file ComputeTask.cpp.

◆ initialize() [2/2]

void Cogs::Core::ComputeTask::initialize ( RenderTaskContext context,
const RenderTaskDefinition taskDefinition 
)
virtual

Reimplemented from Cogs::Core::ProcessTask.

Definition at line 61 of file ComputeTask.cpp.

Member Data Documentation

◆ effectStatus

Cogs::ResourceStatus Cogs::Core::ComputeTask::effectStatus = Cogs::ResourceStatus::Pending
protected

Definition at line 21 of file ComputeTask.h.


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