diff options
Diffstat (limited to 'src/batch.cpp')
| -rw-r--r-- | src/batch.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/batch.cpp b/src/batch.cpp index b36e6d6..36c8a19 100644 --- a/src/batch.cpp +++ b/src/batch.cpp @@ -1,11 +1,15 @@ -#include "batch.hpp" -#include <vector> -#include <iostream> +// external libs #include "glad/glad.h" +// project headers +#include "batch.hpp" #include "texture.hpp" +// std libs +#include <vector> +#include <iostream> + Batch::Batch(unsigned int batch_limit) { @@ -118,7 +122,7 @@ int Batch::primativeDrawQuad( // if surpassing batch limit // or if texture is different if((size >= batch_limit) || ((last_texture != texture_id) && (texture_id != 0))) - this->flush_batch(); last_texture = texture_id; + this->flush(); last_texture = texture_id; float verts[] = { @@ -159,7 +163,7 @@ int Batch::primativeDrawQuad( return 0; } -void Batch::flush_batch() +void Batch::flush() { glBindVertexArray(VAO); |
