Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
fireworks::graphics::Renderer2D Class Referenceabstract

Forward declaration of the graphics::Renderable2D. More...

#include <renderer2d.h>

Inheritance diagram for fireworks::graphics::Renderer2D:
Collaboration diagram for fireworks::graphics::Renderer2D:

Public Member Functions

void push (const glm::mat4 &matrix, bool override=false)
 Pushes the transformation matrix to transform the renderables if using groups. More...
 
void pop ()
 Pops the transformation matrix to transform the renderables if using groups. More...
 
virtual ~Renderer2D ()
 
virtual void begin ()
 Begins the rendering process. More...
 
virtual void submit (const Renderable2D *renderable)=0
 Begins to submit the renderables to render queue. More...
 
virtual void end ()
 Ends the submission and prepares the renderer to start drawing. More...
 
virtual void flush ()=0
 Draws the data processed onto the screen. More...
 

Public Attributes

Camera2Dm_Camera2D
 The camera to which the renderers out will be displayed to. More...
 

Protected Member Functions

 Renderer2D (Camera2D *camera2D)
 Creates the renderer using the camera. More...
 

Protected Attributes

std::vector< glm::mat4 > m_TransformationStack
 The transformation matrix stack that keeps track of relative transformation matrix of the groups. More...
 
const glm::mat4 * m_TransformationBack
 The transformation matrix to renders stuff relative to one another aka if using groups. More...
 

Detailed Description

Forward declaration of the graphics::Renderable2D.

The renderer base class from which different renderers are derived from

Constructor & Destructor Documentation

◆ Renderer2D()

fireworks::graphics::Renderer2D::Renderer2D ( Camera2D camera2D)
inlineprotected

Creates the renderer using the camera.

Parameters
camera2DThe camera to be used with the renderer

◆ ~Renderer2D()

virtual fireworks::graphics::Renderer2D::~Renderer2D ( )
inlinevirtual

Member Function Documentation

◆ begin()

virtual void fireworks::graphics::Renderer2D::begin ( )
inlinevirtual

Begins the rendering process.

Reimplemented in fireworks::graphics::BatchRenderer2D, and fireworks::graphics::ShotRenderer2D.

◆ end()

virtual void fireworks::graphics::Renderer2D::end ( )
inlinevirtual

Ends the submission and prepares the renderer to start drawing.

Reimplemented in fireworks::graphics::BatchRenderer2D, and fireworks::graphics::ShotRenderer2D.

◆ flush()

virtual void fireworks::graphics::Renderer2D::flush ( )
pure virtual

Draws the data processed onto the screen.

Implemented in fireworks::graphics::BatchRenderer2D, and fireworks::graphics::ShotRenderer2D.

◆ pop()

void fireworks::graphics::Renderer2D::pop ( )
inline

Pops the transformation matrix to transform the renderables if using groups.

◆ push()

void fireworks::graphics::Renderer2D::push ( const glm::mat4 &  matrix,
bool  override = false 
)
inline

Pushes the transformation matrix to transform the renderables if using groups.

◆ submit()

virtual void fireworks::graphics::Renderer2D::submit ( const Renderable2D renderable)
pure virtual

Begins to submit the renderables to render queue.

Implemented in fireworks::graphics::BatchRenderer2D, and fireworks::graphics::ShotRenderer2D.

Member Data Documentation

◆ m_Camera2D

Camera2D* fireworks::graphics::Renderer2D::m_Camera2D

The camera to which the renderers out will be displayed to.

◆ m_TransformationBack

const glm::mat4* fireworks::graphics::Renderer2D::m_TransformationBack
protected

The transformation matrix to renders stuff relative to one another aka if using groups.

◆ m_TransformationStack

std::vector<glm::mat4> fireworks::graphics::Renderer2D::m_TransformationStack
protected

The transformation matrix stack that keeps track of relative transformation matrix of the groups.


The documentation for this class was generated from the following file: