Removed unused camera from BlocksPreview

This commit is contained in:
MihailRis 2023-12-01 13:59:51 +03:00
parent d655404b7a
commit 6708e1ef86
2 changed files with 2 additions and 5 deletions

View File

@ -19,11 +19,9 @@ BlocksPreview::BlocksPreview(Shader* shader,
const ContentGfxCache* cache) const ContentGfxCache* cache)
: shader(shader), atlas(atlas), cache(cache) { : shader(shader), atlas(atlas), cache(cache) {
batch = new Batch3D(1024); batch = new Batch3D(1024);
camera = new Camera(vec3(0.0f), 1.0f);
} }
BlocksPreview::~BlocksPreview() { BlocksPreview::~BlocksPreview() {
delete camera;
delete batch; delete batch;
} }
@ -33,7 +31,8 @@ void BlocksPreview::begin() {
glm::ortho(0.0f, glm::ortho(0.0f,
float(Window::width), float(Window::width),
0.0f, 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))); glm::lookAt(vec3(2, 2, 2), vec3(0.0f), vec3(0, 1, 0)));
atlas->getTexture()->bind(); atlas->getTexture()->bind();
} }

View File

@ -7,7 +7,6 @@
class Shader; class Shader;
class Atlas; class Atlas;
class Batch3D; class Batch3D;
class Camera;
class Block; class Block;
class ContentGfxCache; class ContentGfxCache;
@ -15,7 +14,6 @@ class BlocksPreview {
Shader* shader; Shader* shader;
Atlas* atlas; Atlas* atlas;
Batch3D* batch; Batch3D* batch;
Camera* camera;
const ContentGfxCache* const cache; const ContentGfxCache* const cache;
public: public:
BlocksPreview(Shader* shader, Atlas* atlas, const ContentGfxCache* cache); BlocksPreview(Shader* shader, Atlas* atlas, const ContentGfxCache* cache);