added quad primitive, shortcuts and safe entity deletion

This commit is contained in:
Erris
2026-03-02 21:27:42 +01:00
parent c189b12365
commit b7e5ceb1d1
7 changed files with 171 additions and 91 deletions

View File

@@ -3,8 +3,8 @@
#include "open_engine/renderer/editor_camera.hpp"
#include "open_engine/renderer/vertex_array.hpp"
#include "open_engine/renderer/camera.hpp"
#include "open_engine/renderer/buffer.hpp"
#include "open_engine/scene/scene_camera.hpp"
#include <cstdint>
namespace OpenEngine {
@@ -33,6 +33,7 @@ namespace OpenEngine {
Ref<Mesh> CreateMesh(const std::vector<MeshVertex>& vertices,
const std::vector<uint32_t>& indices);
Ref<Mesh> CreateCube(uint32_t id = -1);
Ref<Mesh> CreateQuad(uint32_t id = -1, bool back_face = false);
// ==================================================
class Renderer3D
@@ -41,20 +42,11 @@ namespace OpenEngine {
static void Init();
static void Shutdown();
static void BeginScene(const Camera& camera, const glm::mat4& transform);
static void BeginScene(const SceneCamera& camera, const glm::mat4& transform);
static void BeginScene(const EditorCamera& camera);
static void EndScene();
static void DrawMesh(const Ref<Mesh>& mesh, const glm::mat4& transform);
/*
static void DrawCube(const glm::mat4& transform, const glm::vec4& color,
int entity_id);
static void DrawCube(const glm::mat4& transform, Ref<Texture2D>,
int entity_id);
static void DrawCube(const glm::mat4& transform, Ref<Texture2D>,
const glm::vec4& color, int entity_id);
*/
};
}