mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
rename vattr to VertexAttribute
This commit is contained in:
parent
65287b3273
commit
5240fe6226
11 changed files with 16 additions and 16 deletions
|
|
@ -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)};
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue