Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
RTDrawDescriptor.h
Go to the documentation of this file.
1/*
2Copyright (c) 2018 DIVIDE-Studio
3Copyright (c) 2009 Ionut Cava
4
5This file is part of DIVIDE Framework.
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software
9and associated documentation files (the "Software"), to deal in the Software
10without restriction,
11including without limitation the rights to use, copy, modify, merge, publish,
12distribute, sublicense,
13and/or sell copies of the Software, and to permit persons to whom the
14Software is furnished to do so,
15subject to the following conditions:
16
17The above copyright notice and this permission notice shall be included in
18all copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21IMPLIED,
22INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23PARTICULAR PURPOSE AND NONINFRINGEMENT.
24IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25DAMAGES OR OTHER LIABILITY,
26WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27IN CONNECTION WITH THE SOFTWARE
28OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30*/
31
32#pragma once
33#ifndef DVD_RENDER_TARGET_DRAW_DESCRIPTOR_H_
34#define DVD_RENDER_TARGET_DRAW_DESCRIPTOR_H_
35
36#include "RTAttachment.h"
38
39namespace Divide
40{
41
43constexpr U16 MAX_BLIT_ENTRIES = 8u;
44
46{
50
51 bool operator==(const BlitEntry&) const = default;
52};
53
55{
59
60 bool operator==(const DrawLayerEntry&) const = default;
61};
62
64{
65 FColour4 _colour{0.f}; //For depth, only R channel is used
66 bool _enabled{false};
67};
68
70{
75};
76
77using RTBlitParams = eastl::fixed_vector<RTBlitEntry, MAX_BLIT_ENTRIES, false>;
78using RTClearDescriptor = std::array<RTClearEntry, RT_MAX_ATTACHMENT_COUNT>;
81
83{
85 RTDrawMask _drawMask = {false, false, false, false};
87 bool _autoResolveMSAA{true};
90 bool _layeredRendering{false};
91};
92
93extern BlitEntry INVALID_BLIT_ENTRY;
94extern RTClearEntry DEFAULT_CLEAR_ENTRY;
95
96bool IsValid( const RTBlitParams& params) noexcept;
97
98}; //namespace Divide
99
100#endif //DVD_RENDER_TARGET_DRAW_DESCRIPTOR_H_
101
102#include "RTDrawDescriptor.inl"
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
constexpr U16 MAX_BLIT_ENTRIES
constexpr U8 INVALID_INDEX
eastl::fixed_vector< RTBlitEntry, MAX_BLIT_ENTRIES, false > RTBlitParams
bool[to_base(RTColourAttachmentSlot::COUNT)] RTDrawMask
uint8_t U8
BlitEntry INVALID_BLIT_ENTRY
bool IsValid(const RTBlitParams &params) noexcept
uint16_t U16
constexpr U8 U8_MAX
static constexpr U8 RT_MAX_ATTACHMENT_COUNT
Definition: RTAttachment.h:72
std::array< RTClearEntry, RT_MAX_ATTACHMENT_COUNT > RTClearDescriptor
bool[RT_MAX_ATTACHMENT_COUNT] RTTransitionMask
RTClearEntry DEFAULT_CLEAR_ENTRY
constexpr auto to_base(const Type value) -> Type
U16 _mipOffset
bool operator==(const BlitEntry &) const =default
U8 _index
U16 _layerOffset
U8 _cubeFace
Ignored for non cube textures.
bool operator==(const DrawLayerEntry &) const =default
U16 _layer
U16 _mipCount
BlitEntry _input
U16 _layerCount
BlitEntry _output
bool _enabled
FColour4 _colour
DrawLayerEntry _writeLayers[RT_MAX_ATTACHMENT_COUNT]
bool _layeredRendering
Set to true to bind all image layers to the render target (e.g. for Geometry Shader layered rendering...