Cogs.Core
ResolveResourceTask.h
1#pragma once
2
3#include "Renderer/Tasks/RenderTask.h"
4
5#include "Rendering/Common.h"
6
7namespace Cogs::Core
8{
9 struct CachedEffect;
10
12 {
13 public:
14 virtual ~ResolveResourceTask() {}
15
16 void cleanup(RenderTaskContext * context);
18 void apply(RenderTaskContext * renderContext) override;
19
20 Cogs::ResourceStatus setupColorEffect(RenderTaskContext * context);
21 Cogs::ResourceStatus setupDepthEffect(RenderTaskContext * context);
22 void resolveColorShader(RenderTaskContext * context,
23 RenderTexture * inputTexture,
24 RenderTexture * outputTexture);
25 void resolveDepthShader(RenderTaskContext * context,
26 RenderTexture * inputTexture,
27 RenderTexture * outputTexture);
28
29 enum class ResolveAction
30 {
31 None,
32 Copy,
33 Resolve,
34 ColorShader,
35 DepthShader,
36 };
37
38 ResolveAction action = ResolveAction::None;
39
40 CachedEffect* colorEffect = nullptr;
44
45 CachedEffect* depthEffect = nullptr;
49 };
50}
Cogs::ResourceStatus checkReady(RenderTaskContext *context) override
Check if the task is ready to be applied, e.g.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
ResourceStatus
Status of an asynchronously loaded resource, such as an effect or a pipeline.
Definition: Common.h:198
@ Pending
The resource is still loading.
static const Handle_t NoHandle
Represents a handle to nothing.
Definition: Common.h:78