Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
BlendingProperties.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_BLENDING_PROPERTIES_H_
34#define DVD_BLENDING_PROPERTIES_H_
35
36namespace Divide {
37
39{
40
47 PROPERTY_RW(bool, enabled, false);
48
49 bool operator==(const BlendingSettings&) const = default;
50};
51
52[[nodiscard]] size_t GetHash(const BlendingSettings& properties);
53
54// Blend state 0 with no RT bound == Global blend
56{
57 UColour4 _blendColour = { 0u, 0u, 0u, 0u };
59
60 bool operator==(const RTBlendStates&) const = default;
61};
62
63[[nodiscard]] size_t GetHash(const RTBlendStates& blendStates);
64
65}; //namespace Divide
66
67#endif //DVD_BLENDING_PROPERTIES_H_
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
size_t GetHash(const PropertyDescriptor< T > &descriptor) noexcept
Definition: Resource.inl:40
BlendProperty
Specifies how the red, green, blue, and alpha source blending factors are computed.
BlendOperation
Specifies how source and destination colours are combined.
@ COUNT
Place all properties above this.
constexpr auto to_base(const Type value) -> Type
bool operator==(const BlendingSettings &) const =default
PROPERTY_RW(BlendProperty, blendDest, BlendProperty::ZERO)
PROPERTY_RW(bool, enabled, false)
PROPERTY_RW(BlendOperation, blendOpAlpha, BlendOperation::COUNT)
PROPERTY_RW(BlendOperation, blendOp, BlendOperation::ADD)
PROPERTY_RW(BlendProperty, blendSrcAlpha, BlendProperty::ONE)
PROPERTY_RW(BlendProperty, blendSrc, BlendProperty::ONE)
PROPERTY_RW(BlendProperty, blendDestAlpha, BlendProperty::ZERO)
bool operator==(const RTBlendStates &) const =default
std::array< BlendingSettings, to_base(RTColourAttachmentSlot::COUNT)> _settings