CRenderTarget.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <ionCore.h>
5 #include <ionMath.h>
6 #include <ionGraphics.h>
7 #include <ionWindow.h>
8 
9 
10 namespace ion
11 {
12  namespace Graphics
13  {
14  namespace GL
15  {
16 
17  class CRenderTarget : public virtual IRenderTarget
18  {
19 
20  public:
21 
23 
24  void ClearColor();
25  void ClearDepth();
26  void ClearColorAndDepth();
27 
28  void SetClearColor(color4f const & Color);
29 
30  virtual CImage * ReadImage();
31 
32  virtual void Bind();
33  virtual IRenderTarget * GetCurrentlyBound();
34 
35  CWindow * Window = nullptr;
39  bool SpecifiedViewport = false;
40 
41  virtual void SetViewport(vec2i const & Min, vec2i const & Max);
42  virtual void ClearViewport();
43 
45 
46  };
47 
48  }
49  }
50 }
Definition: SColor.h:8
Definition: IRenderTarget.h:17
virtual CImage * ReadImage()
Definition: CRenderTarget.cpp:49
static CRenderTarget * CurrentlyBound
Definition: CRenderTarget.h:44
void ClearColorAndDepth()
Definition: CRenderTarget.cpp:36
Definition: CRenderTarget.h:17
void SetClearColor(color4f const &Color)
Definition: CRenderTarget.cpp:44
Customized variant of vec4 that intelligently handles conversion between floating point and integer c...
Definition: SColor.h:62
virtual void ClearViewport()
Definition: CRenderTarget.cpp:93
CWindow * Window
Definition: CRenderTarget.h:35
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
Definition: CWindow.h:17
vec2i ViewportMin
Definition: CRenderTarget.h:37
bool SpecifiedViewport
Definition: CRenderTarget.h:39
virtual IRenderTarget * GetCurrentlyBound()
Definition: CRenderTarget.cpp:81
virtual void Bind()
Definition: CRenderTarget.cpp:64
color4f Color
Definition: CRenderTarget.h:36
vec2i ViewportMax
Definition: CRenderTarget.h:38
virtual void SetViewport(vec2i const &Min, vec2i const &Max)
Definition: CRenderTarget.cpp:86
Definition: CImage.h:10
void ClearDepth()
Definition: CRenderTarget.cpp:29
CRenderTarget(CWindow *Window)
Definition: CRenderTarget.cpp:16
void ClearColor()
Definition: CRenderTarget.cpp:21