7 #include "../camera2d.h" 10 namespace fireworks {
namespace graphics {
31 : m_Camera2D(camera2D)
33 m_TransformationStack.push_back(glm::mat4(1.0f));
34 m_TransformationBack = &m_TransformationStack.back();
38 void push(
const glm::mat4& matrix,
bool override =
false)
41 m_TransformationStack.push_back(matrix);
43 m_TransformationStack.push_back(m_TransformationStack.back() * matrix);
45 m_TransformationBack = &m_TransformationStack.back();
51 if(m_TransformationStack.size() > 1)
52 m_TransformationStack.pop_back();
54 m_TransformationBack = &m_TransformationStack.back();
65 virtual void flush() = 0;
The Class responsible for drawing the basic Renderable objects onto the screen.
Definition: renderable2d.h:36
virtual void flush()=0
Draws the data processed onto the screen.
const glm::mat4 * m_TransformationBack
The transformation matrix to renders stuff relative to one another aka if using groups.
Definition: renderer2d.h:24
Definition: audioclip.cpp:3
virtual ~Renderer2D()
Definition: renderer2d.h:57
virtual void submit(const Renderable2D *renderable)=0
Begins to submit the renderables to render queue.
void push(const glm::mat4 &matrix, bool override=false)
Pushes the transformation matrix to transform the renderables if using groups.
Definition: renderer2d.h:38
virtual void begin()
Begins the rendering process.
Definition: renderer2d.h:59
virtual void end()
Ends the submission and prepares the renderer to start drawing.
Definition: renderer2d.h:63
Renderer2D(Camera2D *camera2D)
Creates the renderer using the camera.
Definition: renderer2d.h:30
Forward declaration of the graphics::Renderable2D.
Definition: renderer2d.h:15
The eye of the 2D world.
Definition: camera2d.h:11
Camera2D * m_Camera2D
The camera to which the renderers out will be displayed to.
Definition: renderer2d.h:19
void pop()
Pops the transformation matrix to transform the renderables if using groups.
Definition: renderer2d.h:48
std::vector< glm::mat4 > m_TransformationStack
The transformation matrix stack that keeps track of relative transformation matrix of the groups...
Definition: renderer2d.h:22