Minor refactor
This commit is contained in:
@@ -18,11 +18,10 @@ BlocksPreview::BlocksPreview(Shader* shader,
|
||||
Atlas* atlas,
|
||||
const ContentGfxCache* cache)
|
||||
: shader(shader), atlas(atlas), cache(cache) {
|
||||
batch = new Batch3D(1024);
|
||||
batch = std::make_unique<Batch3D>(1024);
|
||||
}
|
||||
|
||||
BlocksPreview::~BlocksPreview() {
|
||||
delete batch;
|
||||
}
|
||||
|
||||
void BlocksPreview::begin(const Viewport* viewport) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "../typedefs.h"
|
||||
#include <glm/glm.hpp>
|
||||
#include <memory>
|
||||
|
||||
class Viewport;
|
||||
class Shader;
|
||||
@@ -14,7 +15,7 @@ class ContentGfxCache;
|
||||
class BlocksPreview {
|
||||
Shader* shader;
|
||||
Atlas* atlas;
|
||||
Batch3D* batch;
|
||||
std::unique_ptr<Batch3D> batch;
|
||||
const ContentGfxCache* const cache;
|
||||
const Viewport* viewport;
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user