Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Sep 28, 2023
1 parent 3fde7d3 commit c12921f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion engine/include/cubos/engine/renderer/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace cubos::engine
/// @ingroup renderer-plugin
struct [[cubos::component("cubos/renderable_grid", VecStorage)]] RenderableGrid
{
Asset<VoxelGrid> asset; ///< Handle to the grid asset to be rendered.
Asset<VoxelGrid> asset; ///< Handle to the grid asset to be rendered.
glm::vec3 offset = {0.0F, 0.0F, 0.0F}; ///< Translation applied to the voxel grid before any other.
[[cubos::ignore]] RendererGrid handle = nullptr; ///< Handle to the uploaded grid - set automatically.
};
Expand Down
4 changes: 2 additions & 2 deletions engine/src/cubos/engine/renderer/deferred_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ cubos::engine::RendererGrid DeferredRenderer::upload(const VoxelGrid& grid)
vaDesc.elements[0].type = Type::UInt;
vaDesc.elements[0].size = 3;
vaDesc.elements[0].buffer.index = 0;
vaDesc.elements[0].buffer.offset = offsetof(VoxelVertexertexertex, position);
vaDesc.elements[0].buffer.stride = sizeof(VoxelVertexertex);
vaDesc.elements[0].buffer.offset = offsetof(VoxelVertex, position);
vaDesc.elements[0].buffer.stride = sizeof(VoxelVertex);
vaDesc.elements[1].name = "normal";
vaDesc.elements[1].type = Type::Float;
vaDesc.elements[1].size = 3;
Expand Down
3 changes: 2 additions & 1 deletion engine/src/cubos/engine/renderer/vertex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ void cubos::core::data::deserialize(Deserializer& deserializer, VoxelVertex& ver
deserializer.endObject();
}

void cubos::engine::triangulate(const VoxelGrid& grid, std::vector<VoxelVertex>& vertices, std::vector<uint32_t>& indices)
void cubos::engine::triangulate(const VoxelGrid& grid, std::vector<VoxelVertex>& vertices,
std::vector<uint32_t>& indices)
{
std::vector<uint16_t> mask;

Expand Down
6 changes: 3 additions & 3 deletions tools/quadrados/src/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ struct ConvertOptions
/// @brief Represents the data read from a matrix in a QB file.
struct QBMatrix
{
VoxelGrid grid; ///< Grid of the matrix.
VoxelPalette palette; ///< VoxelPalette of the matrix.
glm::ivec3 position; ///< Position of the matrix.
VoxelGrid grid; ///< Grid of the matrix.
VoxelPalette palette; ///< VoxelPalette of the matrix.
glm::ivec3 position; ///< Position of the matrix.
};

/// Prints the help message of the program.
Expand Down

0 comments on commit c12921f

Please sign in to comment.