IRenderTarget.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <ionCore.h>
5 #include <ionMath.h>
6 
7 #include "ITexture.h"
8 
9 
10 namespace ion
11 {
12  namespace Graphics
13  {
14 
17  {
18 
19  public:
20 
21  virtual void ClearColor() = 0;
22  virtual void ClearDepth() = 0;
23  virtual void ClearColorAndDepth() = 0;
24 
25  virtual void SetClearColor(color4f const & Color) = 0;
26 
27  virtual void Bind() = 0;
28  virtual IRenderTarget * GetCurrentlyBound() = 0;
29  virtual void SetViewport(vec2i const & Min, vec2i const & Max) = 0;
30  virtual void ClearViewport() = 0;
31 
32  virtual CImage * ReadImage() = 0;
33 
34  virtual ~IRenderTarget()
35  {}
36 
37  };
38 
41  {
42 
43  public:
44 
45  virtual ~IDepthBuffer()
46  {}
47 
48  };
49 
51  class IFrameBuffer : public virtual IRenderTarget
52  {
53 
54  public:
55 
56  virtual void AttachColorTexture(SharedPointer<ITexture2D> Texture, uint const Attachment) = 0;
57  virtual void AttachDepthTexture(SharedPointer<ITexture2D> Texture) = 0;
58  virtual void AttachDepthBuffer(SharedPointer<IDepthBuffer> DepthBuffer) = 0;
59 
60  virtual bool CheckCorrectness() = 0;
61 
62  virtual ~IFrameBuffer()
63  {}
64 
65  };
66 
67  }
68 }
Definition: IRenderTarget.h:16
virtual ~IFrameBuffer()
Definition: IRenderTarget.h:62
virtual void ClearViewport()=0
virtual ~IDepthBuffer()
Definition: IRenderTarget.h:45
Definition: IRenderTarget.h:51
virtual ~IRenderTarget()
Definition: IRenderTarget.h:34
virtual void ClearColorAndDepth()=0
Definition: IRenderTarget.h:40
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
unsigned int uint
Definition: ionTypes.h:42
virtual void SetClearColor(color4f const &Color)=0
virtual CImage * ReadImage()=0
virtual IRenderTarget * GetCurrentlyBound()=0
virtual void SetViewport(vec2i const &Min, vec2i const &Max)=0
Definition: CImage.h:11
virtual void ClearDepth()=0
std::shared_ptr< T > SharedPointer
Definition: ionSmartPointer.h:25
virtual void ClearColor()=0