CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
GPURenderTarget.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "Common.hpp"
11#include "Forward.hpp"
12
13#include "GPUImage.hpp"
14
17
23
25
26#include <utility>
27
28namespace CeresEngine {
29
33 Color,
34
36 Depth,
37
40
42 Stencil,
43 };
44
52
59 GPUImagePtr image = nullptr;
60
67 GPUImageViewDescriptor imageView = {};
68
71 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
72 CE_REFL_DATA(type);
73 CE_REFL_DATA(image);
74 CE_REFL_DATA(imageView);
75 }
76 };
77
82 GPURenderPassPtr renderPass = nullptr;
83
85 TExtent2<UInt32> resolution;
86
89
93 String name;
94
97 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
98 CE_REFL_DATA(renderPass);
99 CE_REFL_DATA(resolution);
100 CE_REFL_DATA(attachments);
101 CE_REFL_DATA(name);
102 }
103 };
104
105 class CE_SCRIPT_EXPORT() GPURenderTarget : public TDeviceObject<GPURenderTargetDescriptor> {
106 public:
108 using TDeviceObject::TDeviceObject;
109
113
117 };
118
119} // namespace CeresEngine
120
123
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPURenderTarget.hpp:105
GPURenderTarget & operator=(GPURenderTarget &&)=delete
GPURenderTarget & operator=(const GPURenderTarget &)=delete
GPURenderTarget(const GPURenderTarget &)=delete
Deleted copy constructor.
GPURenderTarget(GPURenderTarget &&)=delete
Deleted move constructor.
Definition Common.hpp:62
Definition Application.hpp:19
GPUAttachmentType
Render target attachment type enumeration.
Definition GPURenderTarget.hpp:31
@ DepthStencil
Attachment is used for depth component and stencil index output.
@ Depth
Attachment is used for depth component output.
@ Color
Attachment is used for color output.
@ Stencil
Attachment is used for stencil index output.
sfl::small_vector< T, N, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > SmallVector
SmallVector is a sequence container similar to Vector.
Definition SmallVector.hpp:31
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Render target attachment descriptor structure.
Definition GPURenderTarget.hpp:46
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPURenderTarget.hpp:71
Image view descriptor structure.
Definition GPUImage.hpp:482
Definition GPURenderTarget.hpp:78