Aether3D
Game Engine
Renderer.hpp
1 #ifndef RENDERER_H
2 #define RENDERER_H
3 
4 #ifndef ERRORS_H
5 # include "Errors.hpp"
6 #endif
7 
8 class Scene;
9 class Texture;
10 struct Vec3;
11 struct Vec4;
12 
14 class Renderer
15 {
16  public:
18  static const unsigned apiVersion = 23;
19 
20  /* Destructor. */
21  virtual ~Renderer() {}
22 
29  virtual void AddShaderSearchPath( const char* path ) const = 0;
30 
32  virtual void ClearScreen() const = 0;
33 
35  virtual void Deinit() = 0;
36 
45  virtual void Draw( const Texture* texture, int x, int y, const Vec4& color ) = 0;
46 
57  virtual void Draw( const Texture* texture, int x, int y, int width, int height, const Vec4& color ) = 0;
58 
69  virtual void Draw( const char* text, const char* fontName, float scale, int x, int y, const Vec4& color ) = 0;
70 
76  virtual void Draw( Scene* scene ) = 0;
77 
85  virtual void DrawLines( const Vec3* lineArray, int arraySize, const Vec4& color ) = 0;
86 
88  virtual void DrawStatistics() = 0;
89 
91  virtual void FinishFrame() = 0;
92 
94  virtual double GetTime() const = 0;
95 
97  virtual int Height() const = 0;
98 
107  virtual Error::Enum LoadFont( const char* fontName, const char* fontBitmapPath, const char* fontMetadataPath ) = 0;
108 
118  virtual Error::Enum OpenWindow( int width, int height, bool fullScreen, int antialiasSamples, bool hasWindowAndContext ) = 0;
119 
124  virtual void Resize( int width, int height ) = 0;
125 
133  virtual void SetBloom( bool enable, float factor, int blurIterations ) = 0;
134 
142  virtual void SetClearColor( float red, float green, float blue ) = 0;
143 
151  virtual void SetSSAO( bool enable, float radius, float power ) = 0;
152 
154  virtual void SetWindowTitle( const char* title ) const = 0;
155 
157  virtual void SwapBuffers() = 0;
158 
160  virtual int Width() const = 0;
161 
163  virtual void BeginQuery() = 0;
164 
166  virtual double EndQuery() = 0;
167 
169  virtual bool HasFocus() const = 0;
170 };
171 
172 #endif
Renderer::SetBloom
virtual void SetBloom(bool enable, float factor, int blurIterations)=0
Scene
Stores scene in a scene graph.
Definition: Scene.hpp:28
Renderer::Draw
virtual void Draw(const Texture *texture, int x, int y, const Vec4 &color)=0
Renderer::HasFocus
virtual bool HasFocus() const =0
Renderer::BeginQuery
virtual void BeginQuery()=0
Renderer::DrawStatistics
virtual void DrawStatistics()=0
Renderer::Deinit
virtual void Deinit()=0
Renderer::FinishFrame
virtual void FinishFrame()=0
Texture
2D or Cube Map texture.
Definition: Texture.hpp:7
Renderer::SetClearColor
virtual void SetClearColor(float red, float green, float blue)=0
Renderer::Resize
virtual void Resize(int width, int height)=0
Renderer::SwapBuffers
virtual void SwapBuffers()=0
Renderer::GetTime
virtual double GetTime() const =0
Renderer::AddShaderSearchPath
virtual void AddShaderSearchPath(const char *path) const =0
Adds a path where Material will search for shaders. Paths are searched in order they are added and th...
Vec3
3-component vector.
Definition: Vec3.hpp:22
Renderer::DrawLines
virtual void DrawLines(const Vec3 *lineArray, int arraySize, const Vec4 &color)=0
Renderer::OpenWindow
virtual Error::Enum OpenWindow(int width, int height, bool fullScreen, int antialiasSamples, bool hasWindowAndContext)=0
Renderer::SetSSAO
virtual void SetSSAO(bool enable, float radius, float power)=0
Vec4
4-component vector.
Definition: Vec3.hpp:380
Renderer
Renders models and UI.
Definition: Renderer.hpp:14
Renderer::Height
virtual int Height() const =0
Renderer::ClearScreen
virtual void ClearScreen() const =0
Renderer::apiVersion
static const unsigned apiVersion
Definition: Renderer.hpp:18
Renderer::EndQuery
virtual double EndQuery()=0
Renderer::SetWindowTitle
virtual void SetWindowTitle(const char *title) const =0
Renderer::LoadFont
virtual Error::Enum LoadFont(const char *fontName, const char *fontBitmapPath, const char *fontMetadataPath)=0
Renderer::Width
virtual int Width() const =0