Pioneer
RenderState.h
Go to the documentation of this file.
1 // Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2 // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3 
4 #ifndef _GRAPHICS_RENDERSTATE_H
5 #define _GRAPHICS_RENDERSTATE_H
6 #include "graphics/Types.h"
7 
8 namespace Graphics {
9 
10  struct RenderStateDesc {
15  depthTest(true),
16  depthWrite(true),
17  scissorTest(false)
18  {
19  }
20 
21  bool operator!=(const RenderStateDesc &rhs) const { return !(*this == rhs); }
22  bool operator==(const RenderStateDesc &rhs) const
23  {
24  return blendMode == rhs.blendMode && cullMode == rhs.cullMode && primitiveType == rhs.primitiveType && depthTest == rhs.depthTest && depthWrite == rhs.depthWrite && scissorTest == rhs.scissorTest;
25  }
26 
30  bool depthTest;
31  bool depthWrite;
33  };
34 
35 } // namespace Graphics
36 
37 #endif
Definition: Background.h:14
BlendMode
Definition: Types.h:93
@ BLEND_SOLID
Definition: Types.h:94
FaceCullMode
Definition: Types.h:103
@ CULL_BACK
Definition: Types.h:104
PrimitiveType
Definition: Types.h:82
@ TRIANGLES
Definition: Types.h:87
Definition: RenderState.h:10
bool depthTest
Definition: RenderState.h:30
bool operator!=(const RenderStateDesc &rhs) const
Definition: RenderState.h:21
bool depthWrite
Definition: RenderState.h:31
bool scissorTest
Definition: RenderState.h:32
BlendMode blendMode
Definition: RenderState.h:27
PrimitiveType primitiveType
Definition: RenderState.h:29
RenderStateDesc()
Definition: RenderState.h:11
bool operator==(const RenderStateDesc &rhs) const
Definition: RenderState.h:22
FaceCullMode cullMode
Definition: RenderState.h:28