From 62de63a0d26ece5c0dc2cd48c0a41d35de1e38d4 Mon Sep 17 00:00:00 2001 From: realtradam Date: Fri, 25 Nov 2022 17:36:37 -0500 Subject: cleanup code --- src/batch.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/batch.cpp') 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 -#include +// external libs #include "glad/glad.h" +// project headers +#include "batch.hpp" #include "texture.hpp" +// std libs +#include +#include + 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); -- cgit v1.2.3