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
virtual void Resize(int width, int height)=0
virtual void DrawLines(const Vec3 *lineArray, int arraySize, const Vec4 &color)=0
virtual double EndQuery()=0
Renders models and UI.
Definition: Renderer.hpp:14
virtual void SetSSAO(bool enable, float radius, float power)=0
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...
virtual void ClearScreen() const =0
virtual int Width() const =0
virtual void SetBloom(bool enable, float factor, int blurIterations)=0
4-component vector.
Definition: Vec3.hpp:380
virtual void FinishFrame()=0
virtual void SwapBuffers()=0
virtual void DrawStatistics()=0
virtual void BeginQuery()=0
virtual void Deinit()=0
virtual void SetWindowTitle(const char *title) const =0
virtual void Draw(const Texture *texture, int x, int y, const Vec4 &color)=0
virtual void SetClearColor(float red, float green, float blue)=0
virtual int Height() const =0
Stores scene in a scene graph.
Definition: Scene.hpp:27
3-component vector.
Definition: Vec3.hpp:22
virtual double GetTime() const =0
2D or Cube Map texture.
Definition: Texture.hpp:7
static const unsigned apiVersion
Definition: Renderer.hpp:18
virtual Error::Enum OpenWindow(int width, int height, bool fullScreen, int antialiasSamples, bool hasWindowAndContext)=0
virtual Error::Enum LoadFont(const char *fontName, const char *fontBitmapPath, const char *fontMetadataPath)=0
virtual bool HasFocus() const =0