Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
renderer3d.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 // GLEW
5 #include <GL/glew.h>
6 
7 #include "../Shader.h"
8 #include "../perspectivecamera.h"
9 #include "../buffers/indexbuffer.h"
10 
11 namespace fireworks { namespace graphics {
12 
13  class Renderable3D;
14 
16  class Renderer3D
17  {
18  public:
21  protected:
25  Renderer3D(PerspectiveCamera* camera3D) : m_Camera3D(camera3D) { }
26  public:
27  virtual ~Renderer3D() { }
29  virtual void begin() {}
31  virtual void submit(const Renderable3D* renderable) = 0;
33  virtual void end() {}
35  virtual void flush() = 0;
36  };
37 
38 } }
virtual void flush()=0
Draws the data processed onto the screen.
virtual void end()
Ends the submission and prepares the renderer to start drawing.
Definition: renderer3d.h:33
virtual ~Renderer3D()
Definition: renderer3d.h:27
The Class responsible for drawing the basic 3D Renderable objects onto the screen.
Definition: renderable3d.h:66
Definition: audioclip.cpp:3
virtual void begin()
Begins the rendering process.
Definition: renderer3d.h:29
Forward declaration of the graphics::Renderable3D.
Definition: renderer3d.h:16
PerspectiveCamera * m_Camera3D
The camera to which the renderers out will be displayed to.
Definition: renderer3d.h:20
A perspective camera to view objects in perspective projection.
Definition: perspectivecamera.h:16
virtual void submit(const Renderable3D *renderable)=0
Begins to submit the renderables to render queue.
Renderer3D(PerspectiveCamera *camera3D)
Creates the renderer using the camera.
Definition: renderer3d.h:25