diff --git a/src/assets/Assets.cpp b/src/assets/Assets.cpp index 6dabd8c6..a2af1fb5 100644 --- a/src/assets/Assets.cpp +++ b/src/assets/Assets.cpp @@ -1,10 +1,10 @@ #include "Assets.h" #include "../audio/audio.h" -#include "../graphics/Texture.h" -#include "../graphics/Shader.h" -#include "../graphics/Atlas.h" -#include "../graphics/Font.h" +#include "../graphics/core/Texture.h" +#include "../graphics/core/Shader.h" +#include "../graphics/core/Atlas.h" +#include "../graphics/core/Font.h" #include "../frontend/UiDocument.h" #include "../logic/scripting/scripting.h" diff --git a/src/assets/Assets.h b/src/assets/Assets.h index f085ea7e..0be93771 100644 --- a/src/assets/Assets.h +++ b/src/assets/Assets.h @@ -1,7 +1,7 @@ #ifndef ASSETS_ASSETS_H_ #define ASSETS_ASSETS_H_ -#include "../graphics/TextureAnimation.h" +#include "../graphics/core/TextureAnimation.h" #include #include diff --git a/src/assets/assetload_funcs.cpp b/src/assets/assetload_funcs.cpp index 6eac5cbd..668533b2 100644 --- a/src/assets/assetload_funcs.cpp +++ b/src/assets/assetload_funcs.cpp @@ -9,12 +9,12 @@ #include "../files/engine_paths.h" #include "../coders/png.h" #include "../coders/json.h" -#include "../graphics/Shader.h" -#include "../graphics/Texture.h" -#include "../graphics/ImageData.h" -#include "../graphics/Atlas.h" -#include "../graphics/Font.h" -#include "../graphics/TextureAnimation.h" +#include "../graphics/core/Shader.h" +#include "../graphics/core/Texture.h" +#include "../graphics/core/ImageData.h" +#include "../graphics/core/Atlas.h" +#include "../graphics/core/Font.h" +#include "../graphics/core/TextureAnimation.h" #include "../frontend/UiDocument.h" #include "../logic/scripting/scripting.h" diff --git a/src/coders/png.cpp b/src/coders/png.cpp index 9ac44525..d1711c3c 100644 --- a/src/coders/png.cpp +++ b/src/coders/png.cpp @@ -4,8 +4,8 @@ #include #include -#include "../graphics/ImageData.h" -#include "../graphics/Texture.h" +#include "../graphics/core/ImageData.h" +#include "../graphics/core/Texture.h" #include "../files/files.h" #ifndef _WIN32 diff --git a/src/engine.cpp b/src/engine.cpp index 0ef8d9de..c6c23ffe 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -20,10 +20,10 @@ #include "window/Events.h" #include "window/Camera.h" #include "window/input.h" -#include "graphics/Batch2D.h" -#include "graphics/GfxContext.h" -#include "graphics/Shader.h" -#include "graphics/ImageData.h" +#include "graphics/core/Batch2D.h" +#include "graphics/core/GfxContext.h" +#include "graphics/core/Shader.h" +#include "graphics/core/ImageData.h" #include "frontend/gui/GUI.h" #include "frontend/screens.h" #include "frontend/menu/menu.h" diff --git a/src/frontend/BlocksPreview.cpp b/src/frontend/BlocksPreview.cpp index 3f3291c9..5725601b 100644 --- a/src/frontend/BlocksPreview.cpp +++ b/src/frontend/BlocksPreview.cpp @@ -3,12 +3,13 @@ #include #include "../assets/Assets.h" -#include "../graphics/Viewport.h" -#include "../graphics/Texture.h" -#include "../graphics/Atlas.h" -#include "../graphics/Batch3D.h" -#include "../graphics/Framebuffer.h" -#include "../graphics/GfxContext.h" +#include "../graphics/core/Viewport.h" +#include "../graphics/core/Texture.h" +#include "../graphics/core/Atlas.h" +#include "../graphics/core/Batch3D.h" +#include "../graphics/core/Framebuffer.h" +#include "../graphics/core/GfxContext.h" +#include "../graphics/core/Shader.h" #include "../window/Window.h" #include "../window/Camera.h" #include "../voxels/Block.h" diff --git a/src/frontend/BlocksPreview.h b/src/frontend/BlocksPreview.h index f498e79c..3211b8cd 100644 --- a/src/frontend/BlocksPreview.h +++ b/src/frontend/BlocksPreview.h @@ -2,7 +2,6 @@ #define FRONTEND_BLOCKS_PREVIEW_H_ #include "../typedefs.h" -#include "../graphics/Shader.h" #include #include @@ -13,6 +12,7 @@ class Framebuffer; class Batch3D; class Block; class Content; +class Shader; class ContentGfxCache; class BlocksPreview { diff --git a/src/frontend/ContentGfxCache.cpp b/src/frontend/ContentGfxCache.cpp index f8e7bd40..eadd7a75 100644 --- a/src/frontend/ContentGfxCache.cpp +++ b/src/frontend/ContentGfxCache.cpp @@ -5,7 +5,8 @@ #include "../assets/Assets.h" #include "../content/Content.h" #include "../content/ContentPack.h" -#include "../graphics/Atlas.h" +#include "../graphics/core/Atlas.h" +#include "../graphics/core/UVRegion.h" #include "../voxels/Block.h" #include "../core_defs.h" #include "UiDocument.h" diff --git a/src/frontend/ContentGfxCache.h b/src/frontend/ContentGfxCache.h index b561742b..c5101f99 100644 --- a/src/frontend/ContentGfxCache.h +++ b/src/frontend/ContentGfxCache.h @@ -4,12 +4,12 @@ #include #include #include -#include "../graphics/UVRegion.h" #include "../typedefs.h" class Content; class Assets; class UiDocument; +class UVRegion; using uidocuments_map = std::unordered_map>; diff --git a/src/frontend/InventoryView.cpp b/src/frontend/InventoryView.cpp index 0ca2b752..a689cf07 100644 --- a/src/frontend/InventoryView.cpp +++ b/src/frontend/InventoryView.cpp @@ -8,11 +8,11 @@ #include "../window/Events.h" #include "../window/input.h" #include "../assets/Assets.h" -#include "../graphics/Atlas.h" -#include "../graphics/Shader.h" -#include "../graphics/Batch2D.h" -#include "../graphics/GfxContext.h" -#include "../graphics/Font.h" +#include "../graphics/core/Atlas.h" +#include "../graphics/core/Shader.h" +#include "../graphics/core/Batch2D.h" +#include "../graphics/core/GfxContext.h" +#include "../graphics/core/Font.h" #include "../content/Content.h" #include "../items/ItemDef.h" #include "../items/Inventory.h" diff --git a/src/frontend/LevelFrontend.cpp b/src/frontend/LevelFrontend.cpp index 50267ee4..78f78fed 100644 --- a/src/frontend/LevelFrontend.cpp +++ b/src/frontend/LevelFrontend.cpp @@ -7,7 +7,7 @@ #include "../world/Level.h" #include "../voxels/Block.h" #include "../assets/Assets.h" -#include "../graphics/Atlas.h" +#include "../graphics/core/Atlas.h" #include "../content/Content.h" #include "../logic/LevelController.h" diff --git a/src/frontend/WorldRenderer.cpp b/src/frontend/WorldRenderer.cpp index 4458b1f2..76279549 100644 --- a/src/frontend/WorldRenderer.cpp +++ b/src/frontend/WorldRenderer.cpp @@ -8,13 +8,14 @@ #include "../window/Window.h" #include "../window/Camera.h" #include "../content/Content.h" -#include "../graphics/Mesh.h" -#include "../graphics/Atlas.h" -#include "../graphics/Shader.h" -#include "../graphics/Batch3D.h" -#include "../graphics/Texture.h" -#include "../graphics/LineBatch.h" -#include "../graphics/PostProcessing.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" diff --git a/src/frontend/WorldRenderer.h b/src/frontend/WorldRenderer.h index 9129c83d..70e0969e 100644 --- a/src/frontend/WorldRenderer.h +++ b/src/frontend/WorldRenderer.h @@ -11,8 +11,6 @@ #include #include -#include "../graphics/GfxContext.h" - class Level; class Player; class Camera; @@ -26,6 +24,8 @@ class Chunks; class LevelFrontend; class Skybox; class PostProcessing; +class GfxContext; +struct EngineSettings; class WorldRenderer { Engine* engine; diff --git a/src/frontend/debug_panel.cpp b/src/frontend/debug_panel.cpp index 1af94bb0..7d11e04c 100644 --- a/src/frontend/debug_panel.cpp +++ b/src/frontend/debug_panel.cpp @@ -4,7 +4,7 @@ #include "gui/controls.h" #include "../audio/audio.h" -#include "../graphics/Mesh.h" +#include "../graphics/core/Mesh.h" #include "../objects/Player.h" #include "../physics/Hitbox.h" #include "../world/Level.h" diff --git a/src/frontend/graphics/BlocksRenderer.cpp b/src/frontend/graphics/BlocksRenderer.cpp index 7d9c2dbe..39127a13 100644 --- a/src/frontend/graphics/BlocksRenderer.cpp +++ b/src/frontend/graphics/BlocksRenderer.cpp @@ -2,8 +2,8 @@ #include -#include "../../graphics/Mesh.h" -#include "../../graphics/UVRegion.h" +#include "../../graphics/core/Mesh.h" +#include "../../graphics/core/UVRegion.h" #include "../../constants.h" #include "../../content/Content.h" #include "../../voxels/Block.h" diff --git a/src/frontend/graphics/BlocksRenderer.h b/src/frontend/graphics/BlocksRenderer.h index fb39b667..79255f3c 100644 --- a/src/frontend/graphics/BlocksRenderer.h +++ b/src/frontend/graphics/BlocksRenderer.h @@ -4,7 +4,6 @@ #include #include #include -#include "../../graphics/UVRegion.h" #include "../../voxels/voxel.h" #include "../../typedefs.h" #include "../../settings.h" @@ -17,6 +16,7 @@ class Chunks; class VoxelsVolume; class ChunksStorage; class ContentGfxCache; +class UVRegion; class BlocksRenderer { static const glm::vec3 SUN_VECTOR; diff --git a/src/frontend/graphics/ChunksRenderer.cpp b/src/frontend/graphics/ChunksRenderer.cpp index a3bab60c..4fabfaee 100644 --- a/src/frontend/graphics/ChunksRenderer.cpp +++ b/src/frontend/graphics/ChunksRenderer.cpp @@ -1,6 +1,6 @@ #include "ChunksRenderer.h" -#include "../../graphics/Mesh.h" +#include "../../graphics/core/Mesh.h" #include "BlocksRenderer.h" #include "../../voxels/Chunk.h" #include "../../world/Level.h" diff --git a/src/frontend/graphics/Skybox.cpp b/src/frontend/graphics/Skybox.cpp index 5b08e850..be7157da 100644 --- a/src/frontend/graphics/Skybox.cpp +++ b/src/frontend/graphics/Skybox.cpp @@ -5,12 +5,13 @@ #include #include "../../assets/Assets.h" -#include "../../graphics/Shader.h" -#include "../../graphics/Mesh.h" -#include "../../graphics/Batch3D.h" -#include "../../graphics/Texture.h" -#include "../../graphics/Cubemap.h" -#include "../../graphics/Framebuffer.h" +#include "../../graphics/core/Shader.h" +#include "../../graphics/core/Mesh.h" +#include "../../graphics/core/Batch3D.h" +#include "../../graphics/core/Texture.h" +#include "../../graphics/core/Cubemap.h" +#include "../../graphics/core/Framebuffer.h" +#include "../../graphics/core/GfxContext.h" #include "../../window/Window.h" #include "../../window/Camera.h" diff --git a/src/frontend/graphics/Skybox.h b/src/frontend/graphics/Skybox.h index 25e5416e..31bd89fc 100644 --- a/src/frontend/graphics/Skybox.h +++ b/src/frontend/graphics/Skybox.h @@ -6,7 +6,6 @@ #include #include "../../typedefs.h" #include "../../maths/fastmaths.h" -#include "../../graphics/GfxContext.h" class Mesh; class Shader; @@ -14,6 +13,7 @@ class Assets; class Camera; class Batch3D; class Framebuffer; +class GfxContext; struct skysprite { std::string texture; diff --git a/src/frontend/gui/GUI.cpp b/src/frontend/gui/GUI.cpp index 581909d1..b4b915cf 100644 --- a/src/frontend/gui/GUI.cpp +++ b/src/frontend/gui/GUI.cpp @@ -6,9 +6,9 @@ #include #include "../../assets/Assets.h" -#include "../../graphics/Batch2D.h" -#include "../../graphics/Shader.h" -#include "../../graphics/GfxContext.h" +#include "../../graphics/core/Batch2D.h" +#include "../../graphics/core/Shader.h" +#include "../../graphics/core/GfxContext.h" #include "../../window/Events.h" #include "../../window/input.h" #include "../../window/Camera.h" diff --git a/src/frontend/gui/UINode.cpp b/src/frontend/gui/UINode.cpp index 9d5d60dd..0079b514 100644 --- a/src/frontend/gui/UINode.cpp +++ b/src/frontend/gui/UINode.cpp @@ -1,6 +1,6 @@ #include "UINode.h" -#include "../../graphics/Batch2D.h" +#include "../../graphics/core/Batch2D.h" using gui::UINode; using gui::Align; diff --git a/src/frontend/gui/containers.cpp b/src/frontend/gui/containers.cpp index 9f89d2f8..3a77a819 100644 --- a/src/frontend/gui/containers.cpp +++ b/src/frontend/gui/containers.cpp @@ -5,8 +5,8 @@ #include "../../window/Window.h" #include "../../assets/Assets.h" -#include "../../graphics/Batch2D.h" -#include "../../graphics/GfxContext.h" +#include "../../graphics/core/Batch2D.h" +#include "../../graphics/core/GfxContext.h" using namespace gui; diff --git a/src/frontend/gui/controls.cpp b/src/frontend/gui/controls.cpp index b1bdb7fa..9a1d1790 100644 --- a/src/frontend/gui/controls.cpp +++ b/src/frontend/gui/controls.cpp @@ -7,10 +7,10 @@ #include "../../window/Events.h" #include "../../assets/Assets.h" -#include "../../graphics/Batch2D.h" -#include "../../graphics/Font.h" -#include "../../graphics/Texture.h" -#include "../../graphics/GfxContext.h" +#include "../../graphics/core/Batch2D.h" +#include "../../graphics/core/Font.h" +#include "../../graphics/core/Texture.h" +#include "../../graphics/core/GfxContext.h" #include "../../util/stringutil.h" #include "GUI.h" diff --git a/src/frontend/hud.cpp b/src/frontend/hud.cpp index 3969c48a..b4627620 100644 --- a/src/frontend/hud.cpp +++ b/src/frontend/hud.cpp @@ -12,13 +12,14 @@ #include "../util/stringutil.h" #include "../util/timeutil.h" #include "../assets/Assets.h" -#include "../graphics/Shader.h" -#include "../graphics/Batch2D.h" -#include "../graphics/Batch3D.h" -#include "../graphics/Font.h" -#include "../graphics/Atlas.h" -#include "../graphics/Mesh.h" -#include "../graphics/Texture.h" +#include "../graphics/core/Shader.h" +#include "../graphics/core/Batch2D.h" +#include "../graphics/core/Batch3D.h" +#include "../graphics/core/Font.h" +#include "../graphics/core/Atlas.h" +#include "../graphics/core/Mesh.h" +#include "../graphics/core/Texture.h" +#include "../graphics/core/GfxContext.h" #include "../window/Camera.h" #include "../window/Window.h" #include "../window/Events.h" diff --git a/src/frontend/hud.h b/src/frontend/hud.h index c2a3ee03..dab28840 100644 --- a/src/frontend/hud.h +++ b/src/frontend/hud.h @@ -1,13 +1,13 @@ #ifndef SRC_HUD_H_ #define SRC_HUD_H_ +#include "../typedefs.h" + #include #include - +#include #include -#include "../graphics/GfxContext.h" - class Camera; class Block; class Assets; @@ -19,6 +19,8 @@ class InventoryView; class LevelFrontend; class UiDocument; class InventoryInteraction; +class GfxContext; +class Viewport; namespace gui { class GUI; diff --git a/src/frontend/screens.cpp b/src/frontend/screens.cpp index 9911603d..874b1003 100644 --- a/src/frontend/screens.cpp +++ b/src/frontend/screens.cpp @@ -12,10 +12,10 @@ #include "../window/Camera.h" #include "../window/Events.h" #include "../window/input.h" -#include "../graphics/Shader.h" -#include "../graphics/Batch2D.h" -#include "../graphics/GfxContext.h" -#include "../graphics/TextureAnimation.h" +#include "../graphics/core/Shader.h" +#include "../graphics/core/Batch2D.h" +#include "../graphics/core/GfxContext.h" +#include "../graphics/core/TextureAnimation.h" #include "../assets/Assets.h" #include "../world/Level.h" #include "../world/World.h" diff --git a/src/graphics/Atlas.cpp b/src/graphics/core/Atlas.cpp similarity index 95% rename from src/graphics/Atlas.cpp rename to src/graphics/core/Atlas.cpp index cd49e0c5..cc388345 100644 --- a/src/graphics/Atlas.cpp +++ b/src/graphics/core/Atlas.cpp @@ -1,7 +1,7 @@ #include "Atlas.h" #include -#include "../maths/LMPacker.h" +#include "../../maths/LMPacker.h" #include "Texture.h" #include "ImageData.h" diff --git a/src/graphics/Atlas.h b/src/graphics/core/Atlas.h similarity index 85% rename from src/graphics/Atlas.h rename to src/graphics/core/Atlas.h index ed1c84e4..6fae5396 100644 --- a/src/graphics/Atlas.h +++ b/src/graphics/core/Atlas.h @@ -1,5 +1,5 @@ -#ifndef GRAPHICS_ATLAS_H_ -#define GRAPHICS_ATLAS_H_ +#ifndef GRAPHICS_CORE_ATLAS_H_ +#define GRAPHICS_CORE_ATLAS_H_ #include #include @@ -7,7 +7,7 @@ #include #include #include "UVRegion.h" -#include "../typedefs.h" +#include "../../typedefs.h" class ImageData; class Texture; @@ -45,4 +45,4 @@ public: Atlas* build(uint extrusion, uint maxResolution=8192); }; -#endif // GRAPHICS_ATLAS_H_ +#endif // GRAPHICS_CORE_ATLAS_H_ diff --git a/src/graphics/Batch2D.cpp b/src/graphics/core/Batch2D.cpp similarity index 100% rename from src/graphics/Batch2D.cpp rename to src/graphics/core/Batch2D.cpp diff --git a/src/graphics/Batch2D.h b/src/graphics/core/Batch2D.h similarity index 95% rename from src/graphics/Batch2D.h rename to src/graphics/core/Batch2D.h index eefde67c..03fd495f 100644 --- a/src/graphics/Batch2D.h +++ b/src/graphics/core/Batch2D.h @@ -1,5 +1,5 @@ -#ifndef SRC_GRAPHICS_BATCH2D_H_ -#define SRC_GRAPHICS_BATCH2D_H_ +#ifndef GRAPHICS_CORE_BATCH2D_H_ +#define GRAPHICS_CORE_BATCH2D_H_ #include #include @@ -87,4 +87,4 @@ public: void lineWidth(float width); }; -#endif /* SRC_GRAPHICS_BATCH2D_H_ */ +#endif // GRAPHICS_CORE_BATCH2D_H_ diff --git a/src/graphics/Batch3D.cpp b/src/graphics/core/Batch3D.cpp similarity index 99% rename from src/graphics/Batch3D.cpp rename to src/graphics/core/Batch3D.cpp index 512316d9..a3f56b46 100644 --- a/src/graphics/Batch3D.cpp +++ b/src/graphics/core/Batch3D.cpp @@ -4,7 +4,7 @@ #include "Texture.h" #include -#include "../typedefs.h" +#include "../../typedefs.h" inline constexpr uint B3D_VERTEX_SIZE = 9; diff --git a/src/graphics/Batch3D.h b/src/graphics/core/Batch3D.h similarity index 92% rename from src/graphics/Batch3D.h rename to src/graphics/core/Batch3D.h index 35199201..533a5ae3 100644 --- a/src/graphics/Batch3D.h +++ b/src/graphics/core/Batch3D.h @@ -1,8 +1,8 @@ -#ifndef GRAPHICS_BATCH3D_H_ -#define GRAPHICS_BATCH3D_H_ +#ifndef GRAPHICS_CORE_BATCH3D_H_ +#define GRAPHICS_CORE_BATCH3D_H_ #include "UVRegion.h" -#include "../typedefs.h" +#include "../../typedefs.h" #include #include @@ -51,4 +51,4 @@ public: void flushPoints(); }; -#endif /* GRAPHICS_BATCH3D_H_ */ +#endif // GRAPHICS_CORE_BATCH3D_H_ diff --git a/src/graphics/Cubemap.cpp b/src/graphics/core/Cubemap.cpp similarity index 100% rename from src/graphics/Cubemap.cpp rename to src/graphics/core/Cubemap.cpp diff --git a/src/graphics/Cubemap.h b/src/graphics/core/Cubemap.h similarity index 65% rename from src/graphics/Cubemap.h rename to src/graphics/core/Cubemap.h index 164a0167..21cf0450 100644 --- a/src/graphics/Cubemap.h +++ b/src/graphics/core/Cubemap.h @@ -1,5 +1,5 @@ -#ifndef GRAPHICS_CUBEMAP_H_ -#define GRAPHICS_CUBEMAP_H_ +#ifndef GRAPHICS_CORE_CUBEMAP_H_ +#define GRAPHICS_CORE_CUBEMAP_H_ #include "Texture.h" @@ -12,4 +12,4 @@ public: virtual void unbind() override; }; -#endif // GRAPHICS_CUBEMAP_H_ +#endif // GRAPHICS_CORE_CUBEMAP_H_ diff --git a/src/graphics/Font.cpp b/src/graphics/core/Font.cpp similarity index 100% rename from src/graphics/Font.cpp rename to src/graphics/core/Font.cpp diff --git a/src/graphics/Font.h b/src/graphics/core/Font.h similarity index 89% rename from src/graphics/Font.h rename to src/graphics/core/Font.h index 327e38cc..2c09f044 100644 --- a/src/graphics/Font.h +++ b/src/graphics/core/Font.h @@ -1,10 +1,10 @@ -#ifndef GRAPHICS_FONT_H_ -#define GRAPHICS_FONT_H_ +#ifndef GRAPHICS_CORE_FONT_H_ +#define GRAPHICS_CORE_FONT_H_ #include #include #include -#include "../typedefs.h" +#include "../../typedefs.h" class Texture; class Batch2D; @@ -40,4 +40,4 @@ public: void draw(Batch2D* batch, std::wstring_view text, int x, int y, FontStyle style); }; -#endif /* GRAPHICS_FONT_H_ */ +#endif // GRAPHICS_CORE_FONT_H_ diff --git a/src/graphics/Framebuffer.cpp b/src/graphics/core/Framebuffer.cpp similarity index 100% rename from src/graphics/Framebuffer.cpp rename to src/graphics/core/Framebuffer.cpp diff --git a/src/graphics/Framebuffer.h b/src/graphics/core/Framebuffer.h similarity index 85% rename from src/graphics/Framebuffer.h rename to src/graphics/core/Framebuffer.h index 65680504..8580f4d5 100644 --- a/src/graphics/Framebuffer.h +++ b/src/graphics/core/Framebuffer.h @@ -1,7 +1,7 @@ -#ifndef SRC_GRAPHICS_FRAMEBUFFER_H_ -#define SRC_GRAPHICS_FRAMEBUFFER_H_ +#ifndef GRAPHICS_CORE_FRAMEBUFFER_H_ +#define GRAPHICS_CORE_FRAMEBUFFER_H_ -#include "../typedefs.h" +#include "../../typedefs.h" #include @@ -39,4 +39,4 @@ public: uint getHeight() const; }; -#endif /* SRC_GRAPHICS_FRAMEBUFFER_H_ */ +#endif // GRAPHICS_CORE_FRAMEBUFFER_H_ diff --git a/src/graphics/GfxContext.cpp b/src/graphics/core/GfxContext.cpp similarity index 100% rename from src/graphics/GfxContext.cpp rename to src/graphics/core/GfxContext.cpp diff --git a/src/graphics/GfxContext.h b/src/graphics/core/GfxContext.h similarity index 82% rename from src/graphics/GfxContext.h rename to src/graphics/core/GfxContext.h index 3590d4a1..991339cb 100644 --- a/src/graphics/GfxContext.h +++ b/src/graphics/core/GfxContext.h @@ -1,9 +1,9 @@ -#ifndef GRAPHICS_GFX_CONTEXT_H_ -#define GRAPHICS_GFX_CONTEXT_H_ +#ifndef GRAPHICS_CORE_GFX_CONTEXT_H_ +#define GRAPHICS_CORE_GFX_CONTEXT_H_ -#include "../typedefs.h" #include "Viewport.h" -#include "../window/Window.h" +#include "../../window/Window.h" +#include "../../typedefs.h" class Batch2D; class Framebuffer; @@ -35,4 +35,4 @@ public: void setScissors(glm::vec4 area); }; -#endif // GRAPHICS_GFX_CONTEXT_H_ \ No newline at end of file +#endif // GRAPHICS_CORE_GFX_CONTEXT_H_ diff --git a/src/graphics/ImageData.cpp b/src/graphics/core/ImageData.cpp similarity index 100% rename from src/graphics/ImageData.cpp rename to src/graphics/core/ImageData.cpp diff --git a/src/graphics/ImageData.h b/src/graphics/core/ImageData.h similarity index 86% rename from src/graphics/ImageData.h rename to src/graphics/core/ImageData.h index 4defdb74..41730087 100644 --- a/src/graphics/ImageData.h +++ b/src/graphics/core/ImageData.h @@ -1,7 +1,7 @@ -#ifndef GRAPHICS_IMAGE_DATA_H_ -#define GRAPHICS_IMAGE_DATA_H_ +#ifndef GRAPHICS_CORE_IMAGE_DATA_H_ +#define GRAPHICS_CORE_IMAGE_DATA_H_ -#include "../typedefs.h" +#include "../../typedefs.h" enum class ImageFormat { rgb888, @@ -46,4 +46,4 @@ public: extern ImageData* add_atlas_margins(ImageData* image, int grid_size); -#endif // GRAPHICS_IMAGE_DATA_H_ \ No newline at end of file +#endif // GRAPHICS_CORE_IMAGE_DATA_H_ \ No newline at end of file diff --git a/src/graphics/LineBatch.cpp b/src/graphics/core/LineBatch.cpp similarity index 100% rename from src/graphics/LineBatch.cpp rename to src/graphics/core/LineBatch.cpp diff --git a/src/graphics/LineBatch.h b/src/graphics/core/LineBatch.h similarity index 89% rename from src/graphics/LineBatch.h rename to src/graphics/core/LineBatch.h index 3eb475f2..7b0d13cb 100644 --- a/src/graphics/LineBatch.h +++ b/src/graphics/core/LineBatch.h @@ -1,5 +1,5 @@ -#ifndef GRAPHICS_LINEBATCH_H_ -#define GRAPHICS_LINEBATCH_H_ +#ifndef GRAPHICS_CORE_LINEBATCH_H_ +#define GRAPHICS_CORE_LINEBATCH_H_ #include #include @@ -33,4 +33,4 @@ public: void lineWidth(float width); }; -#endif /* GRAPHICS_LINEBATCH_H_ */ +#endif // GRAPHICS_CORE_LINEBATCH_H_ diff --git a/src/graphics/Mesh.cpp b/src/graphics/core/Mesh.cpp similarity index 100% rename from src/graphics/Mesh.cpp rename to src/graphics/core/Mesh.cpp diff --git a/src/graphics/Mesh.h b/src/graphics/core/Mesh.h similarity index 90% rename from src/graphics/Mesh.h rename to src/graphics/core/Mesh.h index 322c8625..158f3d46 100644 --- a/src/graphics/Mesh.h +++ b/src/graphics/core/Mesh.h @@ -1,8 +1,8 @@ -#ifndef GRAPHICS_MESH_H_ -#define GRAPHICS_MESH_H_ +#ifndef GRAPHICS_CORE_MESH_H_ +#define GRAPHICS_CORE_MESH_H_ #include -#include "../typedefs.h" +#include "../../typedefs.h" struct vattr { ubyte size; @@ -39,4 +39,4 @@ public: static int meshesCount; }; -#endif /* GRAPHICS_MESH_H_ */ +#endif // GRAPHICS_CORE_MESH_H_ diff --git a/src/graphics/PostProcessing.cpp b/src/graphics/core/PostProcessing.cpp similarity index 100% rename from src/graphics/PostProcessing.cpp rename to src/graphics/core/PostProcessing.cpp diff --git a/src/graphics/PostProcessing.h b/src/graphics/core/PostProcessing.h similarity index 89% rename from src/graphics/PostProcessing.h rename to src/graphics/core/PostProcessing.h index d49894e3..68db819b 100644 --- a/src/graphics/PostProcessing.h +++ b/src/graphics/core/PostProcessing.h @@ -1,5 +1,5 @@ -#ifndef GRAPHICS_POST_PROCESSING_H_ -#define GRAPHICS_POST_PROCESSING_H_ +#ifndef GRAPHICS_CORE_POST_PROCESSING_H_ +#define GRAPHICS_CORE_POST_PROCESSING_H_ #include "Viewport.h" #include "GfxContext.h" @@ -34,4 +34,4 @@ public: void render(const GfxContext& context, Shader* screenShader); }; -#endif // GRAPHICS_POST_PROCESSING_H_ +#endif // GRAPHICS_CORE_POST_PROCESSING_H_ diff --git a/src/graphics/Shader.cpp b/src/graphics/core/Shader.cpp similarity index 98% rename from src/graphics/Shader.cpp rename to src/graphics/core/Shader.cpp index ff68ddad..a44d8a7f 100644 --- a/src/graphics/Shader.cpp +++ b/src/graphics/core/Shader.cpp @@ -4,13 +4,14 @@ #include #include #include +#include #include #include #include -#include "../coders/GLSLExtension.h" +#include "../../coders/GLSLExtension.h" namespace fs = std::filesystem; diff --git a/src/graphics/Shader.h b/src/graphics/core/Shader.h similarity index 87% rename from src/graphics/Shader.h rename to src/graphics/core/Shader.h index e2052937..97f90ee2 100644 --- a/src/graphics/Shader.h +++ b/src/graphics/core/Shader.h @@ -1,9 +1,9 @@ -#ifndef GRAPHICS_SHADER_H_ -#define GRAPHICS_SHADER_H_ +#ifndef GRAPHICS_CORE_SHADER_H_ +#define GRAPHICS_CORE_SHADER_H_ #include #include -#include "../typedefs.h" +#include "../../typedefs.h" class GLSLExtension; @@ -33,4 +33,4 @@ public: ); }; -#endif /* GRAPHICS_SHADER_H_ */ +#endif // GRAPHICS_SHADER_H_ diff --git a/src/graphics/Texture.cpp b/src/graphics/core/Texture.cpp similarity index 100% rename from src/graphics/Texture.cpp rename to src/graphics/core/Texture.cpp diff --git a/src/graphics/Texture.h b/src/graphics/core/Texture.h similarity index 81% rename from src/graphics/Texture.h rename to src/graphics/core/Texture.h index 11f8ef6d..e5f0f4f3 100644 --- a/src/graphics/Texture.h +++ b/src/graphics/core/Texture.h @@ -1,8 +1,8 @@ -#ifndef GRAPHICS_TEXTURE_H_ -#define GRAPHICS_TEXTURE_H_ +#ifndef GRAPHICS_CORE_TEXTURE_H_ +#define GRAPHICS_CORE_TEXTURE_H_ #include -#include "../typedefs.h" +#include "../../typedefs.h" #include "ImageData.h" class Texture { @@ -31,4 +31,4 @@ public: static Texture* from(const ImageData* image); }; -#endif /* GRAPHICS_TEXTURE_H_ */ +#endif // GRAPHICS_CORE_TEXTURE_H_ diff --git a/src/graphics/TextureAnimation.cpp b/src/graphics/core/TextureAnimation.cpp similarity index 100% rename from src/graphics/TextureAnimation.cpp rename to src/graphics/core/TextureAnimation.cpp diff --git a/src/graphics/TextureAnimation.h b/src/graphics/core/TextureAnimation.h similarity index 86% rename from src/graphics/TextureAnimation.h rename to src/graphics/core/TextureAnimation.h index a2c655d9..9cc1c685 100644 --- a/src/graphics/TextureAnimation.h +++ b/src/graphics/core/TextureAnimation.h @@ -1,7 +1,7 @@ -#ifndef TEXTURE_ANIMATION_H -#define TEXTURE_ANIMATION_H +#ifndef GRAPHICS_CORE_TEXTURE_ANIMATION_H_ +#define GRAPHICS_CORE_TEXTURE_ANIMATION_H_ -#include "../typedefs.h" +#include "../../typedefs.h" #include #include @@ -49,4 +49,4 @@ private: std::vector animations; }; -#endif // !TEXTURE_ANIMATION_H +#endif // GRAPHICS_CORE_TEXTURE_ANIMATION_H_ diff --git a/src/graphics/UVRegion.cpp b/src/graphics/core/UVRegion.cpp similarity index 100% rename from src/graphics/UVRegion.cpp rename to src/graphics/core/UVRegion.cpp diff --git a/src/graphics/UVRegion.h b/src/graphics/core/UVRegion.h similarity index 67% rename from src/graphics/UVRegion.h rename to src/graphics/core/UVRegion.h index a59f6c30..1b68dbc6 100644 --- a/src/graphics/UVRegion.h +++ b/src/graphics/core/UVRegion.h @@ -1,5 +1,5 @@ -#ifndef SRC_GRAPHICS_UVREGION_H_ -#define SRC_GRAPHICS_UVREGION_H_ +#ifndef GRAPHICS_CORE_UVREGION_H_ +#define GRAPHICS_CORE_UVREGION_H_ class UVRegion { public: @@ -14,4 +14,4 @@ public: UVRegion() : u1(0.0f), v1(0.0f), u2(1.0f), v2(1.0f){} }; -#endif /* SRC_GRAPHICS_UVREGION_H_ */ +#endif // SRC_GRAPHICS_UVREGION_H_ diff --git a/src/graphics/Viewport.cpp b/src/graphics/core/Viewport.cpp similarity index 100% rename from src/graphics/Viewport.cpp rename to src/graphics/core/Viewport.cpp diff --git a/src/graphics/Viewport.h b/src/graphics/core/Viewport.h similarity index 76% rename from src/graphics/Viewport.h rename to src/graphics/core/Viewport.h index 3bfee7ca..b9f66287 100644 --- a/src/graphics/Viewport.h +++ b/src/graphics/core/Viewport.h @@ -1,9 +1,9 @@ -#ifndef GRAPHICS_VIEWPORT_H_ -#define GRAPHICS_VIEWPORT_H_ +#ifndef GRAPHICS_CORE_VIEWPORT_H_ +#define GRAPHICS_CORE_VIEWPORT_H_ #include -#include "../typedefs.h" +#include "../../typedefs.h" class Viewport { uint width; diff --git a/src/graphics/gl_util.h b/src/graphics/core/gl_util.h similarity index 73% rename from src/graphics/gl_util.h rename to src/graphics/core/gl_util.h index 5e7e7953..5644fa3d 100644 --- a/src/graphics/gl_util.h +++ b/src/graphics/core/gl_util.h @@ -1,5 +1,5 @@ -#ifndef GRAPHICS_GL_UTIL_H_ -#define GRAPHICS_GL_UTIL_H_ +#ifndef GRAPHICS_CORE_GL_UTIL_H_ +#define GRAPHICS_CORE_GL_UTIL_H_ #include @@ -16,4 +16,4 @@ namespace gl { } } -#endif // GRAPHICS_GL_UTIL_H_ +#endif // GRAPHICS_CORE_GL_UTIL_H_ diff --git a/src/logic/ChunksController.cpp b/src/logic/ChunksController.cpp index 7eefe0ab..056e65d1 100644 --- a/src/logic/ChunksController.cpp +++ b/src/logic/ChunksController.cpp @@ -11,7 +11,7 @@ #include "../voxels/ChunksStorage.h" #include "../voxels/WorldGenerator.h" #include "../world/WorldGenerators.h" -#include "../graphics/Mesh.h" +#include "../graphics/core/Mesh.h" #include "../lighting/Lighting.h" #include "../files/WorldFiles.h" #include "../world/Level.h" diff --git a/src/voxels/Block.h b/src/voxels/Block.h index 40efab20..fa4b03e3 100644 --- a/src/voxels/Block.h +++ b/src/voxels/Block.h @@ -4,7 +4,9 @@ #include #include #include -#include "../graphics/UVRegion.h" + +// :< +#include "../graphics/core/UVRegion.h" #include "../maths/aabb.h" #include "../typedefs.h" diff --git a/src/voxels/Chunks.cpp b/src/voxels/Chunks.cpp index ffc31939..af5a0ae3 100644 --- a/src/voxels/Chunks.cpp +++ b/src/voxels/Chunks.cpp @@ -7,8 +7,7 @@ #include "../lighting/Lightmap.h" #include "../files/WorldFiles.h" #include "../world/LevelEvents.h" - -#include "../graphics/Mesh.h" +#include "../graphics/core/Mesh.h" #include "../maths/voxmaths.h" #include "../maths/aabb.h" #include "../maths/rays.h" diff --git a/src/window/Window.cpp b/src/window/Window.cpp index 831edf3a..fb085e3e 100644 --- a/src/window/Window.cpp +++ b/src/window/Window.cpp @@ -1,7 +1,7 @@ #include #include "Window.h" #include "Events.h" -#include "../graphics/ImageData.h" +#include "../graphics/core/ImageData.h" #include #include