3#include "common/types/SmartPointers.h"
4#include "utils/Error.h"
6#include "core/ecs/components/model/Mesh.h"
7#include "editor/camera/movable/EditorCamera.h"
8#include "common/maths/Vec.h"
20 Ref<Shader> quadShader;
21 Ref<Shader> lineShader;
22 Ref<Shader> ellipseShader;
23 Vector<Vertex> quadVertices;
24 Vector<unsigned int> quadIndices;
25 Vector<Vertex> ellipseVertices;
26 Vector<unsigned int> ellipseIndices;
27 Vector<Vertex> lineVertices;
28 Vector<unsigned int> lineIndices;
47 static void drawQuad(
float x,
float y,
float width,
float height,
const Maths::Vec3& color);
57 static void Init(
int reserveVertices = 10000);
79 static void DrawQuad(
float x,
float y,
float width,
float height,
const Maths::Vec3& color);
This class provides an interface to draw 2D shapes.
static void BeginScene()
Begins the scene.
static void DrawEllipse(Maths::Vec2 center, float radiusX, float radiusY, Maths::Vec3 color)
Draws an ellipse.
static void Init(int reserveVertices=10000)
Initializes the Renderer2D.
static void EndScene()
Ends the scene.
static void DrawLine(Maths::Vec2 start, Maths::Vec2 end, float thickness, Maths::Vec3 color)
Draws a line.
static void DrawQuad(float x, float y, float width, float height, const Maths::Vec3 &color)
Draws a quad.
static void DrawCircle(Maths::Vec2 center, float radius, Maths::Vec3 color)
Draws a circle.
A struct that contains the data of the shapes.