diff options
| author | realtradam <[email protected]> | 2022-11-25 17:36:37 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-11-25 17:36:37 -0500 |
| commit | 62de63a0d26ece5c0dc2cd48c0a41d35de1e38d4 (patch) | |
| tree | b91117aabf53eb1dec0b8dc0d34c7656872f71e8 /src/batch.cpp | |
| parent | 4e7226ad1b081982e5cbed349edca1c5b0e1b779 (diff) | |
| download | Ogle-62de63a0d26ece5c0dc2cd48c0a41d35de1e38d4.tar.gz Ogle-62de63a0d26ece5c0dc2cd48c0a41d35de1e38d4.zip | |
cleanup code
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); |
