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

Public Member Functions

virtual void initialize (RenderTaskContext *context) override
 
void initialize (RenderTaskContext *context, const RenderTaskDefinition &taskDefinition)
 
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
 

Public Attributes

bool clearColor = false
 
bool clearDepth = false
 
bool clearToDefault = true
 
bool viewportFromTarget = false
 
bool writeColor = true
 
bool writeDepth = false
 
bool depthTest = false
 
- 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
 

Protected Attributes

std::string scopeName
 
Cogs::ResourceStatus effectStatus = Cogs::ResourceStatus::Pending
 
InputLayoutHandle inputLayout
 
SamplerStateBindingHandle samplerStateBindings [4]
 
SamplerStateHandle samplerStates [4]
 

Detailed Description

Definition at line 11 of file PostProcessTask.h.

Constructor & Destructor Documentation

◆ ~PostProcessTask()

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

Definition at line 13 of file PostProcessTask.h.

Member Function Documentation

◆ apply()

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

Implements Cogs::Core::RenderTask.

Definition at line 127 of file PostProcessTask.cpp.

◆ checkReady()

Cogs::ResourceStatus Cogs::Core::PostProcessTask::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 103 of file PostProcessTask.cpp.

References Cogs::IEffects::checkEffect(), Cogs::Error, Cogs::IGraphicsDevice::getBuffers(), Cogs::IGraphicsDevice::getEffects(), Cogs::IEffects::getSamplerStateBinding(), Cogs::Core::HandleIsValid(), Cogs::IBuffers::loadInputLayout(), Cogs::Handle_t< SamplerStateBindingTag >::NoHandle, and Cogs::Ready.

◆ initialize() [1/2]

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

Reimplemented from Cogs::Core::ProcessTask.

Definition at line 36 of file PostProcessTask.cpp.

◆ initialize() [2/2]

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

Reimplemented from Cogs::Core::ProcessTask.

Definition at line 41 of file PostProcessTask.cpp.

Member Data Documentation

◆ clearColor

bool Cogs::Core::PostProcessTask::clearColor = false

Definition at line 19 of file PostProcessTask.h.

◆ clearDepth

bool Cogs::Core::PostProcessTask::clearDepth = false

Definition at line 20 of file PostProcessTask.h.

◆ clearToDefault

bool Cogs::Core::PostProcessTask::clearToDefault = true

Definition at line 22 of file PostProcessTask.h.

◆ depthTest

bool Cogs::Core::PostProcessTask::depthTest = false

Definition at line 27 of file PostProcessTask.h.

◆ effectStatus

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

Definition at line 32 of file PostProcessTask.h.

◆ inputLayout

InputLayoutHandle Cogs::Core::PostProcessTask::inputLayout
protected

Definition at line 34 of file PostProcessTask.h.

◆ samplerStateBindings

SamplerStateBindingHandle Cogs::Core::PostProcessTask::samplerStateBindings[4]
protected

Definition at line 35 of file PostProcessTask.h.

◆ samplerStates

SamplerStateHandle Cogs::Core::PostProcessTask::samplerStates[4]
protected

Definition at line 36 of file PostProcessTask.h.

◆ scopeName

std::string Cogs::Core::PostProcessTask::scopeName
protected

Definition at line 30 of file PostProcessTask.h.

◆ viewportFromTarget

bool Cogs::Core::PostProcessTask::viewportFromTarget = false

Definition at line 23 of file PostProcessTask.h.

◆ writeColor

bool Cogs::Core::PostProcessTask::writeColor = true

Definition at line 25 of file PostProcessTask.h.

◆ writeDepth

bool Cogs::Core::PostProcessTask::writeDepth = false

Definition at line 26 of file PostProcessTask.h.


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