ECS with entt
This commit is contained in:
@@ -31,7 +31,7 @@ class LevelEditor : public ViewLayer
|
||||
GetCamera().OnUpdate();
|
||||
GetFramebuffer()->Bind();
|
||||
}
|
||||
|
||||
|
||||
OpenEngine::RenderCommand::SetClearColor({0.11f, 0.11f, 0.15f, 1.0f});
|
||||
OpenEngine::RenderCommand::Clear();
|
||||
|
||||
@@ -47,7 +47,6 @@ class LevelEditor : public ViewLayer
|
||||
}
|
||||
|
||||
auto& cursor = GetCursorPos();
|
||||
OE_TRACE("world coordinates: {} {}", cursor.x, cursor.y);
|
||||
OpenEngine::Transform tr5 = {glm::vec3(cursor.x, cursor.y, 0.9f), glm::vec3(0.1f, 0.1f, 0.0f), 0.0f};
|
||||
OpenEngine::Renderer2D::DrawQuad(tr5, {1, 1, 1, 1});
|
||||
|
||||
@@ -58,14 +57,8 @@ class LevelEditor : public ViewLayer
|
||||
|
||||
void OnEvent(OpenEngine::Event& event) override
|
||||
{
|
||||
auto& cursor = GetCursorPos();
|
||||
OE_TRACE("world coordinates: {} {}", cursor.x, cursor.y);
|
||||
OpenEngine::Transform tr5 = {glm::vec3(cursor.x, cursor.y, 0.9f), glm::vec3(1.0f, 1.0f, 0.0f), 0.0f};
|
||||
OpenEngine::Renderer2D::DrawQuad(tr5, {1, 1, 1, 1});
|
||||
|
||||
OpenEngine::Renderer2D::EndScene();
|
||||
|
||||
GetFramebuffer()->Unbind();
|
||||
OE_PROFILE_FUNCTION();
|
||||
GetCamera().OnEvent(event);
|
||||
};
|
||||
|
||||
void OnDetach() override {};
|
||||
|
||||
Reference in New Issue
Block a user