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  };
36 
38  enum class EPrimitiveType
39  {
40  Triangle = 0,
41  Line = 1,
42  LineStrip = 2,
43  Point = 3
44  };
45 
48  {
49 
50  public:
51 
52  virtual ~IPipelineState()
53  {}
54 
55  virtual void SetProgram(SharedPointer<IShaderProgram> ShaderProgram) = 0;
56  virtual void SetVertexBuffer(uint const Index, SharedPointer<IVertexBuffer> VertexBuffer) = 0;
57  virtual void SetIndexBuffer(SharedPointer<IIndexBuffer> IndexBuffer) = 0;
58  virtual void SetUniform(string const & Name, SharedPointer<IUniform> Uniform) = 0;
59  virtual void SetTexture(string const & Name, SharedPointer<ITexture> Texture) = 0;
60 
61  virtual void OfferUniform(string const & Name, SharedPointer<IUniform> Uniform) = 0;
62  virtual void OfferTexture(string const & Name, SharedPointer<ITexture> Texture) = 0;
63 
64  virtual void IgnoreUniform(string const & Name) = 0;
65 
66  virtual void SetPrimitiveType(EPrimitiveType const PrimitiveType) = 0;
67  virtual void SetFeatureEnabled(EDrawFeature const Feature, bool const Enabled) = 0;
68  virtual void SetPolygonOffsetAmount(float const Amount) = 0;
69  virtual void SetBlendMode(EBlendMode const BlendMode) = 0;
70 
71  virtual set<string> GetUnboundUniforms() const = 0;
72 
73  virtual void Load() = 0;
74 
75  };
76 
77  }
78 }
EBlendMode
Definition: IPipelineState.h:30
std::shared_ptr< T > SharedPointer
Definition: ionSmartPointer.h:22
unsigned int uint
Definition: ionTypes.h:99
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
Definition: IPipelineState.h:47
EDrawFeature
Definition: IPipelineState.h:19
EPrimitiveType
Definition: IPipelineState.h:38
virtual ~IPipelineState()
Definition: IPipelineState.h:52