added quad primitive, shortcuts and safe entity deletion
This commit is contained in:
@@ -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);
|
||||
*/
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user