IPipelineState.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <ionCore.h>
5 
6 #include "IShaderProgram.h"
7 #include "IVertexBuffer.h"
8 #include "IIndexBuffer.h"
9 #include "IUniform.h"
10 #include "ITexture.h"
11 
12 
13 namespace ion
14 {
15  namespace Graphics
16  {
17 
19  enum class EDrawFeature
20  {
21  Wireframe = 0,
22  CullFront = 1,
23  CullBack = 2,
24  DisableDepthTest = 3,
26  PolygonOffset = 5
27  };
28 
30  enum class EBlendMode
31  {
32  None = 0,
33  Alpha = 1,
34  Additive = 2,
35  Min = 3,
36  Max = 4
37  };
38 
40  enum class EPrimitiveType
41  {
42  Triangle = 0,
43  Line = 1,
44  LineStrip = 2,
45  Point = 3
46  };
47 
50  {
51 
52  public:
53 
54  virtual ~IPipelineState()
55  {}
56 
57  virtual void SetShader(SharedPointer<IShader> ShaderProgram) = 0;
58  virtual void SetVertexBuffer(uint const Index, SharedPointer<IVertexBuffer> VertexBuffer) = 0;
59  virtual void SetIndexBuffer(SharedPointer<IIndexBuffer> IndexBuffer) = 0;
60  virtual void SetUniform(string const & Name, SharedPointer<IUniform> Uniform) = 0;
61  virtual void SetTexture(string const & Name, SharedPointer<ITexture> Texture) = 0;
62 
63  virtual void OfferUniform(string const & Name, SharedPointer<IUniform> Uniform) = 0;
64  virtual void OfferTexture(string const & Name, SharedPointer<ITexture> Texture) = 0;
65 
66  virtual void IgnoreUniform(string const & Name) = 0;
67 
68  virtual void SetPrimitiveType(EPrimitiveType const PrimitiveType) = 0;
69  virtual void SetFeatureEnabled(EDrawFeature const Feature, bool const Enabled) = 0;
70  virtual void SetPolygonOffsetAmount(float const Amount) = 0;
71  virtual void SetBlendMode(EBlendMode const BlendMode) = 0;
72 
73  virtual set<string> GetUnboundUniforms() const = 0;
74 
75  virtual void Load() = 0;
76 
77  };
78 
79  }
80 }
EBlendMode
Definition: IPipelineState.h:30
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
unsigned int uint
Definition: ionTypes.h:42
Definition: IPipelineState.h:49
EDrawFeature
Definition: IPipelineState.h:19
EPrimitiveType
Definition: IPipelineState.h:40
std::shared_ptr< T > SharedPointer
Definition: ionSmartPointer.h:25
virtual ~IPipelineState()
Definition: IPipelineState.h:54