You.i Engine
YiRenderSystem.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_RENDER_SYSTEM_H_
3 #define _YI_RENDER_SYSTEM_H_
4 
5 #include "framework/YiPredef.h"
6 
7 #include <mutex>
8 
9 class CYIRenderSystemPriv;
10 class CYICapabilities;
11 class IYIRenderer;
12 class IYIMaterialFactory;
13 class CYIMeshFactory;
14 class IYIBufferFactory;
15 
28 {
29 public:
34  enum class BlendMode
35  {
36  None = 0,
37  AlphaPreMultiplied = 1,
38  AlphaErase = 2,
40  Additive = 4,
41  Mask = 5,
42  MaskApply = 6,
43  EffectApply = 7,
45  /*
46  * The following section is based of HTML5 CanvasRenderingContext2D.globalCompositeOperation
47  * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
48  */
49 
51  SourceIn = 8,
52  SourceOut = 9,
53  SourceAtop = 10,
54  DestinationOver = 11,
55  DestinationIn = 12,
56  DestinationOut = 13,
57  DestinationAtop = 14,
58  Lighter = Additive,
59  Copy = 15,
60  Xor = 16,
63  };
64 
68  enum class DepthTest
69  {
70  Never = 0,
71  Less,
72  Equal,
73  LessOrEqual,
74  Greater,
75  NotEqual,
76  GreaterOrEqual,
77  Always,
78  DepthTestsCount
79  };
80 
84  enum class StencilMode
85  {
86  Off = 0,
87  GlobalMaskSet,
88  GlobalMaskClear,
89  Capture,
90  CaptureNoOverlap,
91  MaskInner,
92  MaskOuter,
93  MaskInnerAndReset,
94  MaskOuterAndReset,
95  StencilModesCount
96  };
97 
101  enum class Winding
102  {
103  Clockwise = 0,
104  CounterClockwise,
105  WindingsCount
106  };
107 
111  enum class CullFace
112  {
113  None = 0,
114  Front,
115  Back,
116  CullFacesCount
117  };
118 
122  static CYIRenderSystem *GetInstance();
123 
124  virtual ~CYIRenderSystem();
125 
127 
131  const CYICapabilities *GetCapabilities() const;
132 
138 
143 
149 
154 
155 private:
159  CYIRenderSystem();
160 
164  static std::mutex m_RenderSystemMutex;
165 
169  CYIRenderSystemPriv *m_pPriv;
170 
172 };
173 
176 #endif // _YI_RENDER_SYSTEM_H_
#define YI_DISALLOW_COPY_AND_ASSIGN(TypeName)
Delete the copy constructor and assignment operator (and consequently the move constructor as well) ...
Definition: YiPredef.h:122
IYIMaterialFactory * GetMaterialFactory()
void SetScreenFrameBufferBinding()
BlendMode
Definition: YiRenderSystem.h:34
Material Factory interface for the generation of all things texture and shader related.
Definition: YiMaterialFactory.h:23
StencilMode
Definition: YiRenderSystem.h:84
const CYICapabilities * GetCapabilities() const
IYIRenderer * GetSceneRenderer()
IYIBufferFactory * GetBufferFactory()
Definition: YiCapabilities.h:90
Winding
Definition: YiRenderSystem.h:101
CYIMeshFactory * GetMeshFactory()
CYIRenderSystem is a singleton class used to acquire global instances of a number of classes...
Definition: YiRenderSystem.h:27
CullFace
Definition: YiRenderSystem.h:111
DepthTest
Definition: YiRenderSystem.h:68
Factory for the creation of Vertex and Index buffers.
Definition: YiBufferFactory.h:18
Factory for the creation of meshes.
Definition: YiMeshFactory.h:20
static CYIRenderSystem * GetInstance()
virtual ~CYIRenderSystem()
Definition: YiRenderer.h:34