too tired to think
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
#ifndef RENDERER2D_HPP
|
||||
#define RENDERER2D_HPP
|
||||
|
||||
#include "open_engine/core.hpp"
|
||||
#include "open_engine/orthographic_camera.hpp"
|
||||
#include "open_engine/renderer/texture.hpp"
|
||||
#include "open_engine/ref_scope.hpp"
|
||||
|
||||
#include <glm/fwd.hpp>
|
||||
|
||||
namespace OpenEngine {
|
||||
struct Transform
|
||||
{
|
||||
glm::vec3 position = {0.0f, 0.0f, 0.0f};
|
||||
glm::vec3 size = {1.0f, 1.0f, 1.0f};
|
||||
float rotation = 0.0f;
|
||||
};
|
||||
|
||||
class Renderer2D
|
||||
{
|
||||
public:
|
||||
@@ -17,10 +24,8 @@ namespace OpenEngine {
|
||||
static void BeginScene(const OrthographicCamera& camera);
|
||||
static void EndScene();
|
||||
|
||||
static void DrawQuad(const glm::vec2& position, const glm::vec2& size, const glm::vec4& color);
|
||||
static void DrawQuad(const glm::vec3& position, const glm::vec2& size, const glm::vec4& color);
|
||||
static void DrawQuad(const glm::vec2& position, const glm::vec2& size, const Ref<Texture2D>& texture);
|
||||
static void DrawQuad(const glm::vec3& position, const glm::vec2& size, const Ref<Texture2D>& texture);
|
||||
static void DrawQuad(const Transform& transform_data, const glm::vec4& color);
|
||||
static void DrawQuad(const Transform& transform_data, const Ref<Texture2D>& texture, float tiling_factor = 1.0f);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user