Sleeping Wombat Graphic API  1.010
swGraphicAPI
DepthStencilState.h
Go to the documentation of this file.
1 #pragma once
2 
8 #include "swCommonLib/Common/ObjectDeleter.h"
9 #include "ResourceObject.h"
10 
11 
12 
13 
14 
18 {
19  bool EnableDepthTest;
20  bool EnableStencilTest;
21 
22 // ================================ //
23 //
25  : EnableDepthTest( true )
26  , EnableStencilTest( false )
27  {}
28 
29 #define Compare( x ) if( x != other.x ) return false;
30 
31  bool operator== ( const DepthStencilInfo& other ) const
32  {
33  Compare( EnableDepthTest );
34  Compare( EnableStencilTest );
35  }
36 
37 #undef Compare
38 };
39 
40 
41 
42 
46 {
47  RTTR_ENABLE( ResourceObject );
48  friend ObjectDeleter< DepthStencilState >;
49 private:
50 protected:
51 
52  virtual ~DepthStencilState() = default;
53 
54 public:
55  explicit DepthStencilState()
56  : ResourceObject( 0 )
57  {}
58 
59  virtual const DepthStencilInfo& GetDescriptor () = 0;
60 };
Definition: DepthStencilState.h:45
ResourceObject(int id)
Definition: ResourceObject.h:44
Definition: DepthStencilState.h:17
Plik zawiera deklarację i definicję klasy ResourceObject służącą do zliczania odwołań do obiektu...
Klasa ułatwiająca zarządzanie odwołaniami do assetów.Obiekty assetów (np. MaterialObject, TextureObject, VertexShader, PixelShader itp.) wymagają jakiegoś systemu zapewniającego współdzielenie między innymi obiektami.
Definition: ResourceObject.h:30