IDrawContext.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <ionCore.h>
5 
6 #include "IPipelineState.h"
7 
8 
9 namespace ion
10 {
11  namespace Graphics
12  {
13 
17  {
18 
19  public:
20 
21  virtual ~IDrawConfig()
22  {}
23 
24  virtual void SetVertexBuffer(uint const Index, SharedPointer<IVertexBuffer> VertexBuffer) = 0;
25  virtual void SetIndexBuffer(SharedPointer<IIndexBuffer> IndexBuffer) = 0;
26  virtual void SetUniform(string const & Name, SharedPointer<IUniform> Uniform) = 0;
27  virtual void SetTexture(string const & Name, SharedPointer<ITexture> Texture) = 0;
28  virtual void SetInstanceCount(uint const Count) = 0;
29 
30  };
31 
35  {
36 
37  public:
38 
39  virtual ~IDrawContext()
40  {}
41 
42  virtual void SetProgram(SharedPointer<IShaderProgram> ShaderProgram) = 0;
43  virtual void SetVertexBuffer(uint const Index, SharedPointer<IVertexBuffer> VertexBuffer) = 0;
44  virtual void SetIndexBuffer(SharedPointer<IIndexBuffer> IndexBuffer) = 0;
45  virtual void SetUniform(string const & Name, SharedPointer<IUniform> Uniform) = 0;
46  virtual void SetTexture(string const & Name, SharedPointer<ITexture> Texture) = 0;
47 
48  virtual void SetPrimitiveType(EPrimitiveType const PrimitiveType) = 0;
49  virtual void SetFeatureEnabled(EDrawFeature const Feature, bool const Enabled) = 0;
50  virtual void SetBlendMode(EBlendMode const BlendMode) = 0;
51  virtual void SetInstancingEnabled(bool const Enabled) = 0;
52 
53  virtual set<string> GetUnboundUniforms() const = 0;
54 
55  virtual void Draw(IDrawConfig * DrawConfig) = 0;
56  virtual IDrawConfig * CreateDrawConfig() = 0;
57 
58  };
59 
60  }
61 }
virtual void SetTexture(string const &Name, SharedPointer< ITexture > Texture)=0
EBlendMode
Definition: IPipelineState.h:30
std::shared_ptr< T > SharedPointer
Definition: ionSmartPointer.h:22
virtual ~IDrawContext()
Definition: IDrawContext.h:39
virtual void SetInstanceCount(uint const Count)=0
virtual void SetIndexBuffer(SharedPointer< IIndexBuffer > IndexBuffer)=0
unsigned int uint
Definition: ionTypes.h:99
Alternative to Pipeline State rendering. Represents the context for one or many draw calls...
Definition: IDrawContext.h:34
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
virtual void SetUniform(string const &Name, SharedPointer< IUniform > Uniform)=0
EDrawFeature
Definition: IPipelineState.h:19
Alternative to Pipeline State rendering. Represents a single draw call.
Definition: IDrawContext.h:16
EPrimitiveType
Definition: IPipelineState.h:38
virtual void SetVertexBuffer(uint const Index, SharedPointer< IVertexBuffer > VertexBuffer)=0
virtual ~IDrawConfig()
Definition: IDrawContext.h:21