From 6708e1ef86cbad467f5287b7209dbdb6dc2468ec Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 1 Dec 2023 13:59:51 +0300 Subject: [PATCH] Removed unused camera from BlocksPreview --- src/frontend/BlocksPreview.cpp | 5 ++--- src/frontend/BlocksPreview.h | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/frontend/BlocksPreview.cpp b/src/frontend/BlocksPreview.cpp index c3ca5056..1798af87 100644 --- a/src/frontend/BlocksPreview.cpp +++ b/src/frontend/BlocksPreview.cpp @@ -19,11 +19,9 @@ BlocksPreview::BlocksPreview(Shader* shader, const ContentGfxCache* cache) : shader(shader), atlas(atlas), cache(cache) { batch = new Batch3D(1024); - camera = new Camera(vec3(0.0f), 1.0f); } BlocksPreview::~BlocksPreview() { - delete camera; delete batch; } @@ -33,7 +31,8 @@ void BlocksPreview::begin() { glm::ortho(0.0f, float(Window::width), 0.0f, - float(Window::height), -1000.0f, 1000.0f) * + float(Window::height), + -1000.0f, 1000.0f) * glm::lookAt(vec3(2, 2, 2), vec3(0.0f), vec3(0, 1, 0))); atlas->getTexture()->bind(); } diff --git a/src/frontend/BlocksPreview.h b/src/frontend/BlocksPreview.h index d48e6ca4..5c75004f 100644 --- a/src/frontend/BlocksPreview.h +++ b/src/frontend/BlocksPreview.h @@ -7,7 +7,6 @@ class Shader; class Atlas; class Batch3D; -class Camera; class Block; class ContentGfxCache; @@ -15,7 +14,6 @@ class BlocksPreview { Shader* shader; Atlas* atlas; Batch3D* batch; - Camera* camera; const ContentGfxCache* const cache; public: BlocksPreview(Shader* shader, Atlas* atlas, const ContentGfxCache* cache);