mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
remove GLEW from MeshData.hpp & format Mesh.inl
This commit is contained in:
parent
ec0dbae3f7
commit
47b7472231
10 changed files with 125 additions and 70 deletions
|
|
@ -21,12 +21,11 @@ struct MainBatchVertex {
|
|||
std::array<uint8_t,4> color;
|
||||
|
||||
static constexpr VertexAttribute ATTRIBUTES[] = {
|
||||
{GL_FLOAT, false, 3},
|
||||
{GL_FLOAT, false, 2},
|
||||
{GL_FLOAT, false, 3},
|
||||
{GL_UNSIGNED_BYTE, true, 4},
|
||||
{0}
|
||||
};
|
||||
{VertexAttribute::Type::FLOAT, false, 3},
|
||||
{VertexAttribute::Type::FLOAT, false, 2},
|
||||
{VertexAttribute::Type::FLOAT, false, 3},
|
||||
{VertexAttribute::Type::UNSIGNED_BYTE, true, 4},
|
||||
{{}, 0}};
|
||||
};
|
||||
|
||||
class MainBatch {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ class DrawContext;
|
|||
struct SkyboxVertex {
|
||||
glm::vec2 position;
|
||||
|
||||
static constexpr VertexAttribute ATTRIBUTES[] {{GL_FLOAT,false,2}, {0}};
|
||||
static constexpr VertexAttribute ATTRIBUTES[] {
|
||||
{VertexAttribute::Type::FLOAT, false, 2},
|
||||
{{}, 0}};
|
||||
};
|
||||
|
||||
struct skysprite {
|
||||
|
|
|
|||
|
|
@ -3,13 +3,12 @@
|
|||
#include <vector>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <glm/vec2.hpp>
|
||||
#include <glm/vec3.hpp>
|
||||
|
||||
#include "graphics/core/MeshData.hpp"
|
||||
#include "util/Buffer.hpp"
|
||||
|
||||
|
||||
|
||||
/// @brief Chunk mesh vertex format
|
||||
struct ChunkVertex {
|
||||
glm::vec3 position;
|
||||
|
|
@ -17,11 +16,10 @@ struct ChunkVertex {
|
|||
std::array<uint8_t, 4> color;
|
||||
|
||||
static constexpr VertexAttribute ATTRIBUTES[] = {
|
||||
{GL_FLOAT, false, 3},
|
||||
{GL_FLOAT, false, 2},
|
||||
{GL_UNSIGNED_BYTE, true, 4},
|
||||
{0}
|
||||
};
|
||||
{VertexAttribute::Type::FLOAT, false, 3},
|
||||
{VertexAttribute::Type::FLOAT, false, 2},
|
||||
{VertexAttribute::Type::UNSIGNED_BYTE, true, 4},
|
||||
{{}, 0}};
|
||||
};
|
||||
|
||||
/// @brief Chunk mesh vertex attributes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue