rename vattr to VertexAttribute

This commit is contained in:
MihailRis
2024-11-17 01:00:27 +03:00
parent 65287b3273
commit 5240fe6226
11 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -656,8 +656,8 @@ ChunkMeshData BlocksRenderer::createMesh() {
MeshData(
util::Buffer<float>(vertexBuffer.get(), vertexOffset),
util::Buffer<int>(indexBuffer.get(), indexSize),
util::Buffer<vattr>(
CHUNK_VATTRS, sizeof(CHUNK_VATTRS) / sizeof(vattr)
util::Buffer<VertexAttribute>(
CHUNK_VATTRS, sizeof(CHUNK_VATTRS) / sizeof(VertexAttribute)
)
),
std::move(sortingMesh)};
+1 -1
View File
@@ -6,7 +6,7 @@
#include "voxels/Chunks.hpp"
#include "voxels/Chunk.hpp"
static const vattr attrs[] = {
static const VertexAttribute attrs[] = {
{3}, {2}, {3}, {1}, {0}
};
+1 -1
View File
@@ -39,7 +39,7 @@ Skybox::Skybox(uint size, Shader& shader)
-1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 1.0f,
-1.0f, -1.0f, 1.0f, 1.0f, 1.0f, -1.0f
};
vattr attrs[] {{2}, {0}};
VertexAttribute attrs[] {{2}, {0}};
mesh = std::make_unique<Mesh>(vertices, 6, attrs);
sprites.push_back(skysprite {
+1 -1
View File
@@ -8,7 +8,7 @@
#include "util/Buffer.hpp"
/// @brief Chunk mesh vertex attributes
inline const vattr CHUNK_VATTRS[]{ {3}, {2}, {1}, {0} };
inline const VertexAttribute CHUNK_VATTRS[]{ {3}, {2}, {1}, {0} };
/// @brief Chunk mesh vertex size divided by sizeof(float)
inline constexpr int CHUNK_VERTEX_SIZE = 6;