diff --git a/src/frontend/WorldRenderer.cpp b/src/frontend/WorldRenderer.cpp index 76279549..e0ca3d51 100644 --- a/src/frontend/WorldRenderer.cpp +++ b/src/frontend/WorldRenderer.cpp @@ -5,36 +5,36 @@ #include #include -#include "../window/Window.h" -#include "../window/Camera.h" -#include "../content/Content.h" -#include "../graphics/core/Mesh.h" -#include "../graphics/core/Atlas.h" -#include "../graphics/core/Shader.h" -#include "../graphics/core/Batch3D.h" -#include "../graphics/core/Texture.h" -#include "../graphics/core/LineBatch.h" -#include "../graphics/core/PostProcessing.h" -#include "../graphics/core/GfxContext.h" -#include "../voxels/Chunks.h" -#include "../voxels/Chunk.h" -#include "../voxels/Block.h" -#include "../world/World.h" -#include "../world/Level.h" -#include "../world/LevelEvents.h" -#include "../objects/Player.h" #include "../assets/Assets.h" +#include "../content/Content.h" +#include "../engine.h" +#include "../graphics/core/Atlas.h" +#include "../graphics/core/Batch3D.h" +#include "../graphics/core/GfxContext.h" +#include "../graphics/core/LineBatch.h" +#include "../graphics/core/Mesh.h" +#include "../graphics/core/PostProcessing.h" +#include "../graphics/core/Shader.h" +#include "../graphics/core/Texture.h" +#include "../graphics/render/ChunksRenderer.h" +#include "../graphics/render/Skybox.h" +#include "../items/Inventory.h" +#include "../items/ItemDef.h" +#include "../items/ItemStack.h" #include "../logic/PlayerController.h" #include "../maths/FrustumCulling.h" #include "../maths/voxmaths.h" +#include "../objects/Player.h" #include "../settings.h" -#include "../engine.h" -#include "../items/ItemDef.h" -#include "../items/ItemStack.h" -#include "../items/Inventory.h" +#include "../voxels/Block.h" +#include "../voxels/Chunk.h" +#include "../voxels/Chunks.h" +#include "../window/Camera.h" +#include "../window/Window.h" +#include "../world/Level.h" +#include "../world/LevelEvents.h" +#include "../world/World.h" #include "LevelFrontend.h" -#include "graphics/Skybox.h" -#include "graphics/ChunksRenderer.h" WorldRenderer::WorldRenderer(Engine* engine, LevelFrontend* frontend, Player* player) : engine(engine), diff --git a/src/frontend/graphics/BlocksRenderer.cpp b/src/graphics/render/BlocksRenderer.cpp similarity index 98% rename from src/frontend/graphics/BlocksRenderer.cpp rename to src/graphics/render/BlocksRenderer.cpp index 39127a13..6ad23edb 100644 --- a/src/frontend/graphics/BlocksRenderer.cpp +++ b/src/graphics/render/BlocksRenderer.cpp @@ -2,8 +2,8 @@ #include -#include "../../graphics/core/Mesh.h" -#include "../../graphics/core/UVRegion.h" +#include "../core/Mesh.h" +#include "../core/UVRegion.h" #include "../../constants.h" #include "../../content/Content.h" #include "../../voxels/Block.h" @@ -20,17 +20,19 @@ using glm::vec4; const uint BlocksRenderer::VERTEX_SIZE = 6; const vec3 BlocksRenderer::SUN_VECTOR (0.411934f, 0.863868f, -0.279161f); -BlocksRenderer::BlocksRenderer(size_t capacity, +BlocksRenderer::BlocksRenderer( + size_t capacity, const Content* content, const ContentGfxCache* cache, - const EngineSettings& settings) - : content(content), + const EngineSettings& settings +) : content(content), vertexOffset(0), indexOffset(0), indexSize(0), capacity(capacity), cache(cache), - settings(settings) { + settings(settings) +{ vertexBuffer = new float[capacity]; indexBuffer = new int[capacity]; voxelsBuffer = new VoxelsVolume(CHUNK_W + 2, CHUNK_H, CHUNK_D + 2); diff --git a/src/frontend/graphics/BlocksRenderer.h b/src/graphics/render/BlocksRenderer.h similarity index 93% rename from src/frontend/graphics/BlocksRenderer.h rename to src/graphics/render/BlocksRenderer.h index 79255f3c..5b3dfbc6 100644 --- a/src/frontend/graphics/BlocksRenderer.h +++ b/src/graphics/render/BlocksRenderer.h @@ -1,5 +1,5 @@ -#ifndef GRAPHICS_BLOCKS_RENDERER_H -#define GRAPHICS_BLOCKS_RENDERER_H +#ifndef GRAPHICS_RENDER_BLOCKS_RENDERER_H +#define GRAPHICS_RENDER_BLOCKS_RENDERER_H #include #include @@ -99,4 +99,4 @@ public: VoxelsVolume* getVoxelsBuffer() const; }; -#endif // GRAPHICS_BLOCKS_RENDERER_H +#endif // GRAPHICS_RENDER_BLOCKS_RENDERER_H diff --git a/src/frontend/graphics/ChunksRenderer.cpp b/src/graphics/render/ChunksRenderer.cpp similarity index 100% rename from src/frontend/graphics/ChunksRenderer.cpp rename to src/graphics/render/ChunksRenderer.cpp diff --git a/src/frontend/graphics/ChunksRenderer.h b/src/graphics/render/ChunksRenderer.h similarity index 92% rename from src/frontend/graphics/ChunksRenderer.h rename to src/graphics/render/ChunksRenderer.h index b530d9e0..23cb351e 100644 --- a/src/frontend/graphics/ChunksRenderer.h +++ b/src/graphics/render/ChunksRenderer.h @@ -1,5 +1,5 @@ -#ifndef SRC_GRAPHICS_CHUNKSRENDERER_H_ -#define SRC_GRAPHICS_CHUNKSRENDERER_H_ +#ifndef GRAPHICS_RENDER_CHUNKSRENDERER_H_ +#define GRAPHICS_RENDER_CHUNKSRENDERER_H_ #include #include @@ -64,4 +64,4 @@ public: void update(); }; -#endif // SRC_GRAPHICS_CHUNKSRENDERER_H_ +#endif // GRAPHICS_RENDER_CHUNKSRENDERER_H_ diff --git a/src/frontend/graphics/Skybox.cpp b/src/graphics/render/Skybox.cpp similarity index 100% rename from src/frontend/graphics/Skybox.cpp rename to src/graphics/render/Skybox.cpp diff --git a/src/frontend/graphics/Skybox.h b/src/graphics/render/Skybox.h similarity index 86% rename from src/frontend/graphics/Skybox.h rename to src/graphics/render/Skybox.h index 31bd89fc..371c9105 100644 --- a/src/frontend/graphics/Skybox.h +++ b/src/graphics/render/Skybox.h @@ -1,5 +1,5 @@ -#ifndef FRONTEND_GRAPHICS_SKYBOX_H_ -#define FRONTEND_GRAPHICS_SKYBOX_H_ +#ifndef GRAPHICS_RENDER_SKYBOX_H_ +#define GRAPHICS_RENDER_SKYBOX_H_ #include #include @@ -55,4 +55,4 @@ public: } }; -#endif // FRONTEND_GRAPHICS_SKYBOX_H_ +#endif // GRAPHICS_RENDER_SKYBOX_H_