From ec0dbae3f7636606cddebc8f67dde2c8856ae47b Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 26 Apr 2025 23:27:45 +0300 Subject: [PATCH] remove extra glew includes --- src/coders/png.cpp | 1 - src/graphics/core/Batch2D.cpp | 2 -- src/graphics/core/Batch3D.cpp | 1 - src/graphics/core/MeshData.hpp | 9 ++++----- src/graphics/render/WorldRenderer.cpp | 1 - 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/coders/png.cpp b/src/coders/png.cpp index ddf5fea8..ce40e9cc 100644 --- a/src/coders/png.cpp +++ b/src/coders/png.cpp @@ -1,7 +1,6 @@ #include "png.hpp" #include -#include #include diff --git a/src/graphics/core/Batch2D.cpp b/src/graphics/core/Batch2D.cpp index 1d2362d2..0da82ccd 100644 --- a/src/graphics/core/Batch2D.cpp +++ b/src/graphics/core/Batch2D.cpp @@ -4,8 +4,6 @@ #include "gl_util.hpp" #include "maths/UVRegion.hpp" -#include - #include diff --git a/src/graphics/core/Batch3D.cpp b/src/graphics/core/Batch3D.cpp index 862bc677..bd79b127 100644 --- a/src/graphics/core/Batch3D.cpp +++ b/src/graphics/core/Batch3D.cpp @@ -3,7 +3,6 @@ #include "Mesh.hpp" #include "Texture.hpp" -#include #include "typedefs.hpp" #include "maths/UVRegion.hpp" diff --git a/src/graphics/core/MeshData.hpp b/src/graphics/core/MeshData.hpp index 1bcceb9e..53229584 100644 --- a/src/graphics/core/MeshData.hpp +++ b/src/graphics/core/MeshData.hpp @@ -12,20 +12,19 @@ struct VertexAttribute { bool normalized = false; ubyte count = 0; - [[nodiscard]] uint32_t size() const { switch (type) { case GL_FLOAT: - return count * sizeof(float); + return count * sizeof(GLfloat); case GL_UNSIGNED_INT: case GL_INT: - return count * sizeof(uint32_t); + return count * sizeof(GLint); case GL_UNSIGNED_SHORT: case GL_SHORT: - return count * sizeof(uint16_t); + return count * sizeof(GLshort); case GL_UNSIGNED_BYTE: case GL_BYTE: - return count * sizeof(uint8_t); + return count * sizeof(GLbyte); default: throw std::runtime_error("VertexAttribute type is not supported"); } diff --git a/src/graphics/render/WorldRenderer.cpp b/src/graphics/render/WorldRenderer.cpp index 04a0e427..79a9edfc 100644 --- a/src/graphics/render/WorldRenderer.cpp +++ b/src/graphics/render/WorldRenderer.cpp @@ -1,6 +1,5 @@ #include "WorldRenderer.hpp" -#include #include #include