minor refactor
This commit is contained in:
@@ -19,12 +19,11 @@ Batch2D::Batch2D(size_t capacity) : capacity(capacity), color(1.0f){
|
||||
ubyte pixels[] = {
|
||||
0xFF, 0xFF, 0xFF, 0xFF
|
||||
};
|
||||
blank = new Texture(pixels, 1, 1, GL_RGBA);
|
||||
blank = std::make_unique<Texture>(pixels, 1, 1, GL_RGBA);
|
||||
_texture = nullptr;
|
||||
}
|
||||
|
||||
Batch2D::~Batch2D(){
|
||||
delete blank;
|
||||
delete[] buffer;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,9 @@ class Batch2D {
|
||||
float* buffer;
|
||||
size_t capacity;
|
||||
std::unique_ptr<Mesh> mesh;
|
||||
std::unique_ptr<Texture> blank;
|
||||
size_t index;
|
||||
glm::vec4 color;
|
||||
|
||||
Texture* blank;
|
||||
Texture* _texture;
|
||||
|
||||
void vertex(
|
||||
|
||||
Reference in New Issue
Block a user