From c12921ff38a62e9045169d4b3951b2539ad77200 Mon Sep 17 00:00:00 2001 From: Ricardo Antunes Date: Thu, 28 Sep 2023 15:20:30 +0100 Subject: [PATCH] style: format code --- engine/include/cubos/engine/renderer/plugin.hpp | 2 +- engine/src/cubos/engine/renderer/deferred_renderer.cpp | 4 ++-- engine/src/cubos/engine/renderer/vertex.cpp | 3 ++- tools/quadrados/src/convert.cpp | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/engine/include/cubos/engine/renderer/plugin.hpp b/engine/include/cubos/engine/renderer/plugin.hpp index b0f9c72e9..1001843ac 100644 --- a/engine/include/cubos/engine/renderer/plugin.hpp +++ b/engine/include/cubos/engine/renderer/plugin.hpp @@ -67,7 +67,7 @@ namespace cubos::engine /// @ingroup renderer-plugin struct [[cubos::component("cubos/renderable_grid", VecStorage)]] RenderableGrid { - Asset asset; ///< Handle to the grid asset to be rendered. + Asset 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. }; diff --git a/engine/src/cubos/engine/renderer/deferred_renderer.cpp b/engine/src/cubos/engine/renderer/deferred_renderer.cpp index 14a956d66..144c0f060 100644 --- a/engine/src/cubos/engine/renderer/deferred_renderer.cpp +++ b/engine/src/cubos/engine/renderer/deferred_renderer.cpp @@ -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; diff --git a/engine/src/cubos/engine/renderer/vertex.cpp b/engine/src/cubos/engine/renderer/vertex.cpp index b7bd0fc4c..9d1628c3f 100644 --- a/engine/src/cubos/engine/renderer/vertex.cpp +++ b/engine/src/cubos/engine/renderer/vertex.cpp @@ -23,7 +23,8 @@ void cubos::core::data::deserialize(Deserializer& deserializer, VoxelVertex& ver deserializer.endObject(); } -void cubos::engine::triangulate(const VoxelGrid& grid, std::vector& vertices, std::vector& indices) +void cubos::engine::triangulate(const VoxelGrid& grid, std::vector& vertices, + std::vector& indices) { std::vector mask; diff --git a/tools/quadrados/src/convert.cpp b/tools/quadrados/src/convert.cpp index 1ee12a174..be5225ef2 100644 --- a/tools/quadrados/src/convert.cpp +++ b/tools/quadrados/src/convert.cpp @@ -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.