mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
clang warnings fix
This commit is contained in:
parent
4a22e8d57b
commit
f25677d6d2
20 changed files with 37 additions and 45 deletions
|
|
@ -11,17 +11,17 @@ using glm::vec2;
|
|||
using glm::vec3;
|
||||
using glm::vec4;
|
||||
|
||||
Batch2D::Batch2D(size_t capacity) : capacity(capacity), offset(0), color(1.0f, 1.0f, 1.0f, 1.0f){
|
||||
Batch2D::Batch2D(size_t capacity) : capacity(capacity), color(1.0f){
|
||||
const vattr attrs[] = {
|
||||
{2}, {2}, {4}, {0}
|
||||
};
|
||||
|
||||
buffer = new float[capacity * B2D_VERTEX_SIZE];
|
||||
mesh = new Mesh(buffer, 0, attrs);
|
||||
mesh = std::make_unique<Mesh>(buffer, 0, attrs);
|
||||
index = 0;
|
||||
|
||||
unsigned char pixels[] = {
|
||||
255, 255, 255, 255,
|
||||
ubyte pixels[] = {
|
||||
0xFF, 0xFF, 0xFF, 0xFF
|
||||
};
|
||||
blank = new Texture(pixels, 1, 1, GL_RGBA);
|
||||
_texture = nullptr;
|
||||
|
|
@ -30,7 +30,6 @@ Batch2D::Batch2D(size_t capacity) : capacity(capacity), offset(0), color(1.0f, 1
|
|||
Batch2D::~Batch2D(){
|
||||
delete blank;
|
||||
delete[] buffer;
|
||||
delete mesh;
|
||||
}
|
||||
|
||||
void Batch2D::begin(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue