Cogs.Core
Source
Renderer
Tasks
ProcessTask.h
1
#pragma once
2
3
#include "RenderTask.h"
4
#include "Utilities/Expressions.h"
5
#include "Renderer/EffectCache.h"
6
#include "Resources/MaterialOptions.h"
7
8
#include "Rendering/Common.h"
9
#include "Rendering/SamplerState.h"
10
11
#include "Serialization/RenderPipelineReader.h"
12
13
namespace
Cogs
14
{
15
namespace
Core
16
{
17
struct
ProcessTaskProperty
18
{
19
ProcessTaskProperty
() {};
20
ProcessTaskProperty
(
const
ProcessTaskProperty
& original) : expressions(original.expressions) {
21
definition = original.definition;
22
23
std::memcpy(
static_cast<
void
*
>
(&float4x4Value), &original.float4x4Value,
sizeof
(float4x4Value));
24
}
25
26
const
ParsedValue
* definition =
nullptr
;
27
std::vector<std::pair<size_t, Expression*>> expressions;
28
union
29
{
30
float
floatValue;
31
glm::vec2 float2Value;
32
glm::vec3 float3Value;
33
glm::vec4 float4Value;
34
glm::mat4 float4x4Value;
35
int
intValue;
36
glm::ivec2 int2Value;
37
glm::ivec3 int3Value;
38
glm::ivec4 int4Value;
39
uint32_t uintValue;
40
glm::uvec2 uint2Value;
41
glm::uvec3 uint3Value;
42
glm::uvec4 uint4Value;
43
bool
boolValue;
44
struct
{
45
StringView
samplerName;
// Stable views from Strings, will be passed to Cogs.Rendering
46
SamplerStateHandle
samplerState;
47
} texture;
48
};
49
};
50
51
struct
ProcessTask
:
public
RenderTask
52
{
53
virtual
~ProcessTask
() {}
54
55
EffectDescription
createEffectDesc(
RenderTaskContext
* context);
56
57
void
cleanup(
RenderTaskContext
* context)
override
;
58
59
void
setProperties(
RenderTaskContext
* context,
Cogs::Core::RenderTexture
* targetSource =
nullptr
);
60
61
ParsedValue
effectParameter;
62
63
BlendMode
blendMode =
BlendMode::None
;
64
uint32_t texUnit = 0;
65
66
ExpressionContext
* scope =
nullptr
;
67
68
std::vector<ProcessTaskProperty> properties;
69
ProcessTaskProperty
groups;
70
71
struct
CachedEffect
* effect =
nullptr
;
72
};
73
}
74
}
Cogs::StringView
Provides a weakly referenced view over the contents of a string.
Definition:
StringView.h:24
Cogs::Core::BlendMode
BlendMode
Defines blending modes for rendering.
Definition:
MaterialOptions.h:13
Cogs::Core::BlendMode::None
@ None
No blending enabled for opaque shapes, defaults to Blend for transparent shapes.
Cogs
Contains all Cogs related functionality.
Definition:
FieldSetter.h:23
Cogs::Core::CachedEffect
Definition:
EffectCache.h:24
Cogs::Core::EffectDescription
Definition:
EffectCache.h:15
Cogs::Core::ExpressionContext
Provides a context for evaluation of expressions.
Definition:
Expressions.h:54
Cogs::Core::ParsedValue
Stores the parsed output of a key/value pair.
Definition:
Parsing.h:32
Cogs::Core::ProcessTaskProperty
Definition:
ProcessTask.h:18
Cogs::Core::ProcessTask
Definition:
ProcessTask.h:52
Cogs::Core::RenderTaskContext
Definition:
RenderTask.h:53
Cogs::Core::RenderTask
Definition:
RenderTask.h:78
Cogs::Core::RenderTexture
Definition:
RenderTexture.h:20
Cogs::Handle_t< SamplerTag >
Generated by
1.9.6