Ocular Engine
BlendState.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_BLEND_STATE__H__
19 #define __H__OCULAR_GRAPHICS_BLEND_STATE__H__
20 
21 #include "Math/Vector4.hpp"
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
35  namespace Graphics
36  {
40  enum class BlendType
41  {
42  Zero = 0,
43  One,
44  SrcColor,
45  OneMinusSrcColor,
46  SrcAlpha,
47  OneMinusSrcAlpha,
48  DestAlpha,
49  OneMinusDestAlpha,
50  DestColor,
51  OneMinusDestColor,
52  AlphaSaturate,
53  BlendFactor,
54  OneMinusBlendFactor,
55  AlphaBlendFactor,
56  OneMinusAlphaBlendFactor,
57  Src1Color,
58  OneMinusSrc1Color,
59  Src1Alpha,
60  OneMinusSrc1Alpha
61  };
62 
66  enum class BlendEquation
67  {
68  Add = 0,
69  Subtract,
70  ReverseSubtract,
71  Min,
72  Max
73  };
74 
89  struct BlendState
90  {
92 
93  BlendType srcBlend;
94  BlendType destBlend;
95  BlendType alphaSrcBlend;
96  BlendType alphaDestBlend;
97 
98  BlendEquation blendEquation;
99  BlendEquation alphaBlendEquation;
100 
102  };
103  }
107 }
112 //------------------------------------------------------------------------------------------
113 
114 #endif
BlendType destBlend
The operation to perform on the current pixel RGB value in the RenderTexture.
Definition: BlendState.hpp:94
BlendType alphaSrcBlend
The operation to perform on pixel alpha value output from the Fragment/Pixel shaders.
Definition: BlendState.hpp:95
Definition: Matrix3x3.hpp:39
BlendEquation alphaBlendEquation
How to combine the alphaSrcBlend and alphaDestBlend operations.
Definition: BlendState.hpp:99
bool enableBlending
If TRUE, blending operations will be performed.
Definition: BlendState.hpp:91
Math::Vector4f blendFactor
Custom blend factor employed when using BlendType::BlendFactor, BlendType::OneMinusBlendFactor, BlendType::AlphaBlendFactor, and/or BlendType::OneMinusAlphaBlendFactor.
Definition: BlendState.hpp:101
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: BlendState.hpp:89
BlendType srcBlend
The operation to perform on pixel RGB values output from the Fragment/Pixel shaders.
Definition: BlendState.hpp:93
BlendType alphaDestBlend
The operation to perform on the current pixel alpha value in the RenderTexture.
Definition: BlendState.hpp:96
BlendEquation blendEquation
How to combine the srcBlend and destBlend operations.
Definition: BlendState.hpp:98