src/graphics moved to src/graphics/core

This commit is contained in:
MihailRis 2024-03-18 20:47:35 +03:00
parent ba762584a7
commit b56408a202
63 changed files with 156 additions and 147 deletions

View File

@ -1,10 +1,10 @@
#include "Assets.h" #include "Assets.h"
#include "../audio/audio.h" #include "../audio/audio.h"
#include "../graphics/Texture.h" #include "../graphics/core/Texture.h"
#include "../graphics/Shader.h" #include "../graphics/core/Shader.h"
#include "../graphics/Atlas.h" #include "../graphics/core/Atlas.h"
#include "../graphics/Font.h" #include "../graphics/core/Font.h"
#include "../frontend/UiDocument.h" #include "../frontend/UiDocument.h"
#include "../logic/scripting/scripting.h" #include "../logic/scripting/scripting.h"

View File

@ -1,7 +1,7 @@
#ifndef ASSETS_ASSETS_H_ #ifndef ASSETS_ASSETS_H_
#define ASSETS_ASSETS_H_ #define ASSETS_ASSETS_H_
#include "../graphics/TextureAnimation.h" #include "../graphics/core/TextureAnimation.h"
#include <string> #include <string>
#include <memory> #include <memory>

View File

@ -9,12 +9,12 @@
#include "../files/engine_paths.h" #include "../files/engine_paths.h"
#include "../coders/png.h" #include "../coders/png.h"
#include "../coders/json.h" #include "../coders/json.h"
#include "../graphics/Shader.h" #include "../graphics/core/Shader.h"
#include "../graphics/Texture.h" #include "../graphics/core/Texture.h"
#include "../graphics/ImageData.h" #include "../graphics/core/ImageData.h"
#include "../graphics/Atlas.h" #include "../graphics/core/Atlas.h"
#include "../graphics/Font.h" #include "../graphics/core/Font.h"
#include "../graphics/TextureAnimation.h" #include "../graphics/core/TextureAnimation.h"
#include "../frontend/UiDocument.h" #include "../frontend/UiDocument.h"
#include "../logic/scripting/scripting.h" #include "../logic/scripting/scripting.h"

View File

@ -4,8 +4,8 @@
#include <memory> #include <memory>
#include <GL/glew.h> #include <GL/glew.h>
#include "../graphics/ImageData.h" #include "../graphics/core/ImageData.h"
#include "../graphics/Texture.h" #include "../graphics/core/Texture.h"
#include "../files/files.h" #include "../files/files.h"
#ifndef _WIN32 #ifndef _WIN32

View File

@ -20,10 +20,10 @@
#include "window/Events.h" #include "window/Events.h"
#include "window/Camera.h" #include "window/Camera.h"
#include "window/input.h" #include "window/input.h"
#include "graphics/Batch2D.h" #include "graphics/core/Batch2D.h"
#include "graphics/GfxContext.h" #include "graphics/core/GfxContext.h"
#include "graphics/Shader.h" #include "graphics/core/Shader.h"
#include "graphics/ImageData.h" #include "graphics/core/ImageData.h"
#include "frontend/gui/GUI.h" #include "frontend/gui/GUI.h"
#include "frontend/screens.h" #include "frontend/screens.h"
#include "frontend/menu/menu.h" #include "frontend/menu/menu.h"

View File

@ -3,12 +3,13 @@
#include <glm/ext.hpp> #include <glm/ext.hpp>
#include "../assets/Assets.h" #include "../assets/Assets.h"
#include "../graphics/Viewport.h" #include "../graphics/core/Viewport.h"
#include "../graphics/Texture.h" #include "../graphics/core/Texture.h"
#include "../graphics/Atlas.h" #include "../graphics/core/Atlas.h"
#include "../graphics/Batch3D.h" #include "../graphics/core/Batch3D.h"
#include "../graphics/Framebuffer.h" #include "../graphics/core/Framebuffer.h"
#include "../graphics/GfxContext.h" #include "../graphics/core/GfxContext.h"
#include "../graphics/core/Shader.h"
#include "../window/Window.h" #include "../window/Window.h"
#include "../window/Camera.h" #include "../window/Camera.h"
#include "../voxels/Block.h" #include "../voxels/Block.h"

View File

@ -2,7 +2,6 @@
#define FRONTEND_BLOCKS_PREVIEW_H_ #define FRONTEND_BLOCKS_PREVIEW_H_
#include "../typedefs.h" #include "../typedefs.h"
#include "../graphics/Shader.h"
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <memory> #include <memory>
@ -13,6 +12,7 @@ class Framebuffer;
class Batch3D; class Batch3D;
class Block; class Block;
class Content; class Content;
class Shader;
class ContentGfxCache; class ContentGfxCache;
class BlocksPreview { class BlocksPreview {

View File

@ -5,7 +5,8 @@
#include "../assets/Assets.h" #include "../assets/Assets.h"
#include "../content/Content.h" #include "../content/Content.h"
#include "../content/ContentPack.h" #include "../content/ContentPack.h"
#include "../graphics/Atlas.h" #include "../graphics/core/Atlas.h"
#include "../graphics/core/UVRegion.h"
#include "../voxels/Block.h" #include "../voxels/Block.h"
#include "../core_defs.h" #include "../core_defs.h"
#include "UiDocument.h" #include "UiDocument.h"

View File

@ -4,12 +4,12 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include "../graphics/UVRegion.h"
#include "../typedefs.h" #include "../typedefs.h"
class Content; class Content;
class Assets; class Assets;
class UiDocument; class UiDocument;
class UVRegion;
using uidocuments_map = std::unordered_map<std::string, std::shared_ptr<UiDocument>>; using uidocuments_map = std::unordered_map<std::string, std::shared_ptr<UiDocument>>;

View File

@ -8,11 +8,11 @@
#include "../window/Events.h" #include "../window/Events.h"
#include "../window/input.h" #include "../window/input.h"
#include "../assets/Assets.h" #include "../assets/Assets.h"
#include "../graphics/Atlas.h" #include "../graphics/core/Atlas.h"
#include "../graphics/Shader.h" #include "../graphics/core/Shader.h"
#include "../graphics/Batch2D.h" #include "../graphics/core/Batch2D.h"
#include "../graphics/GfxContext.h" #include "../graphics/core/GfxContext.h"
#include "../graphics/Font.h" #include "../graphics/core/Font.h"
#include "../content/Content.h" #include "../content/Content.h"
#include "../items/ItemDef.h" #include "../items/ItemDef.h"
#include "../items/Inventory.h" #include "../items/Inventory.h"

View File

@ -7,7 +7,7 @@
#include "../world/Level.h" #include "../world/Level.h"
#include "../voxels/Block.h" #include "../voxels/Block.h"
#include "../assets/Assets.h" #include "../assets/Assets.h"
#include "../graphics/Atlas.h" #include "../graphics/core/Atlas.h"
#include "../content/Content.h" #include "../content/Content.h"
#include "../logic/LevelController.h" #include "../logic/LevelController.h"

View File

@ -8,13 +8,14 @@
#include "../window/Window.h" #include "../window/Window.h"
#include "../window/Camera.h" #include "../window/Camera.h"
#include "../content/Content.h" #include "../content/Content.h"
#include "../graphics/Mesh.h" #include "../graphics/core/Mesh.h"
#include "../graphics/Atlas.h" #include "../graphics/core/Atlas.h"
#include "../graphics/Shader.h" #include "../graphics/core/Shader.h"
#include "../graphics/Batch3D.h" #include "../graphics/core/Batch3D.h"
#include "../graphics/Texture.h" #include "../graphics/core/Texture.h"
#include "../graphics/LineBatch.h" #include "../graphics/core/LineBatch.h"
#include "../graphics/PostProcessing.h" #include "../graphics/core/PostProcessing.h"
#include "../graphics/core/GfxContext.h"
#include "../voxels/Chunks.h" #include "../voxels/Chunks.h"
#include "../voxels/Chunk.h" #include "../voxels/Chunk.h"
#include "../voxels/Block.h" #include "../voxels/Block.h"

View File

@ -11,8 +11,6 @@
#include <glm/ext.hpp> #include <glm/ext.hpp>
#include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/matrix_transform.hpp>
#include "../graphics/GfxContext.h"
class Level; class Level;
class Player; class Player;
class Camera; class Camera;
@ -26,6 +24,8 @@ class Chunks;
class LevelFrontend; class LevelFrontend;
class Skybox; class Skybox;
class PostProcessing; class PostProcessing;
class GfxContext;
struct EngineSettings;
class WorldRenderer { class WorldRenderer {
Engine* engine; Engine* engine;

View File

@ -4,7 +4,7 @@
#include "gui/controls.h" #include "gui/controls.h"
#include "../audio/audio.h" #include "../audio/audio.h"
#include "../graphics/Mesh.h" #include "../graphics/core/Mesh.h"
#include "../objects/Player.h" #include "../objects/Player.h"
#include "../physics/Hitbox.h" #include "../physics/Hitbox.h"
#include "../world/Level.h" #include "../world/Level.h"

View File

@ -2,8 +2,8 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "../../graphics/Mesh.h" #include "../../graphics/core/Mesh.h"
#include "../../graphics/UVRegion.h" #include "../../graphics/core/UVRegion.h"
#include "../../constants.h" #include "../../constants.h"
#include "../../content/Content.h" #include "../../content/Content.h"
#include "../../voxels/Block.h" #include "../../voxels/Block.h"

View File

@ -4,7 +4,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <vector> #include <vector>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "../../graphics/UVRegion.h"
#include "../../voxels/voxel.h" #include "../../voxels/voxel.h"
#include "../../typedefs.h" #include "../../typedefs.h"
#include "../../settings.h" #include "../../settings.h"
@ -17,6 +16,7 @@ class Chunks;
class VoxelsVolume; class VoxelsVolume;
class ChunksStorage; class ChunksStorage;
class ContentGfxCache; class ContentGfxCache;
class UVRegion;
class BlocksRenderer { class BlocksRenderer {
static const glm::vec3 SUN_VECTOR; static const glm::vec3 SUN_VECTOR;

View File

@ -1,6 +1,6 @@
#include "ChunksRenderer.h" #include "ChunksRenderer.h"
#include "../../graphics/Mesh.h" #include "../../graphics/core/Mesh.h"
#include "BlocksRenderer.h" #include "BlocksRenderer.h"
#include "../../voxels/Chunk.h" #include "../../voxels/Chunk.h"
#include "../../world/Level.h" #include "../../world/Level.h"

View File

@ -5,12 +5,13 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "../../assets/Assets.h" #include "../../assets/Assets.h"
#include "../../graphics/Shader.h" #include "../../graphics/core/Shader.h"
#include "../../graphics/Mesh.h" #include "../../graphics/core/Mesh.h"
#include "../../graphics/Batch3D.h" #include "../../graphics/core/Batch3D.h"
#include "../../graphics/Texture.h" #include "../../graphics/core/Texture.h"
#include "../../graphics/Cubemap.h" #include "../../graphics/core/Cubemap.h"
#include "../../graphics/Framebuffer.h" #include "../../graphics/core/Framebuffer.h"
#include "../../graphics/core/GfxContext.h"
#include "../../window/Window.h" #include "../../window/Window.h"
#include "../../window/Camera.h" #include "../../window/Camera.h"

View File

@ -6,7 +6,6 @@
#include <vector> #include <vector>
#include "../../typedefs.h" #include "../../typedefs.h"
#include "../../maths/fastmaths.h" #include "../../maths/fastmaths.h"
#include "../../graphics/GfxContext.h"
class Mesh; class Mesh;
class Shader; class Shader;
@ -14,6 +13,7 @@ class Assets;
class Camera; class Camera;
class Batch3D; class Batch3D;
class Framebuffer; class Framebuffer;
class GfxContext;
struct skysprite { struct skysprite {
std::string texture; std::string texture;

View File

@ -6,9 +6,9 @@
#include <algorithm> #include <algorithm>
#include "../../assets/Assets.h" #include "../../assets/Assets.h"
#include "../../graphics/Batch2D.h" #include "../../graphics/core/Batch2D.h"
#include "../../graphics/Shader.h" #include "../../graphics/core/Shader.h"
#include "../../graphics/GfxContext.h" #include "../../graphics/core/GfxContext.h"
#include "../../window/Events.h" #include "../../window/Events.h"
#include "../../window/input.h" #include "../../window/input.h"
#include "../../window/Camera.h" #include "../../window/Camera.h"

View File

@ -1,6 +1,6 @@
#include "UINode.h" #include "UINode.h"
#include "../../graphics/Batch2D.h" #include "../../graphics/core/Batch2D.h"
using gui::UINode; using gui::UINode;
using gui::Align; using gui::Align;

View File

@ -5,8 +5,8 @@
#include "../../window/Window.h" #include "../../window/Window.h"
#include "../../assets/Assets.h" #include "../../assets/Assets.h"
#include "../../graphics/Batch2D.h" #include "../../graphics/core/Batch2D.h"
#include "../../graphics/GfxContext.h" #include "../../graphics/core/GfxContext.h"
using namespace gui; using namespace gui;

View File

@ -7,10 +7,10 @@
#include "../../window/Events.h" #include "../../window/Events.h"
#include "../../assets/Assets.h" #include "../../assets/Assets.h"
#include "../../graphics/Batch2D.h" #include "../../graphics/core/Batch2D.h"
#include "../../graphics/Font.h" #include "../../graphics/core/Font.h"
#include "../../graphics/Texture.h" #include "../../graphics/core/Texture.h"
#include "../../graphics/GfxContext.h" #include "../../graphics/core/GfxContext.h"
#include "../../util/stringutil.h" #include "../../util/stringutil.h"
#include "GUI.h" #include "GUI.h"

View File

@ -12,13 +12,14 @@
#include "../util/stringutil.h" #include "../util/stringutil.h"
#include "../util/timeutil.h" #include "../util/timeutil.h"
#include "../assets/Assets.h" #include "../assets/Assets.h"
#include "../graphics/Shader.h" #include "../graphics/core/Shader.h"
#include "../graphics/Batch2D.h" #include "../graphics/core/Batch2D.h"
#include "../graphics/Batch3D.h" #include "../graphics/core/Batch3D.h"
#include "../graphics/Font.h" #include "../graphics/core/Font.h"
#include "../graphics/Atlas.h" #include "../graphics/core/Atlas.h"
#include "../graphics/Mesh.h" #include "../graphics/core/Mesh.h"
#include "../graphics/Texture.h" #include "../graphics/core/Texture.h"
#include "../graphics/core/GfxContext.h"
#include "../window/Camera.h" #include "../window/Camera.h"
#include "../window/Window.h" #include "../window/Window.h"
#include "../window/Events.h" #include "../window/Events.h"

View File

@ -1,13 +1,13 @@
#ifndef SRC_HUD_H_ #ifndef SRC_HUD_H_
#define SRC_HUD_H_ #define SRC_HUD_H_
#include "../typedefs.h"
#include <string> #include <string>
#include <memory> #include <memory>
#include <vector>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "../graphics/GfxContext.h"
class Camera; class Camera;
class Block; class Block;
class Assets; class Assets;
@ -19,6 +19,8 @@ class InventoryView;
class LevelFrontend; class LevelFrontend;
class UiDocument; class UiDocument;
class InventoryInteraction; class InventoryInteraction;
class GfxContext;
class Viewport;
namespace gui { namespace gui {
class GUI; class GUI;

View File

@ -12,10 +12,10 @@
#include "../window/Camera.h" #include "../window/Camera.h"
#include "../window/Events.h" #include "../window/Events.h"
#include "../window/input.h" #include "../window/input.h"
#include "../graphics/Shader.h" #include "../graphics/core/Shader.h"
#include "../graphics/Batch2D.h" #include "../graphics/core/Batch2D.h"
#include "../graphics/GfxContext.h" #include "../graphics/core/GfxContext.h"
#include "../graphics/TextureAnimation.h" #include "../graphics/core/TextureAnimation.h"
#include "../assets/Assets.h" #include "../assets/Assets.h"
#include "../world/Level.h" #include "../world/Level.h"
#include "../world/World.h" #include "../world/World.h"

View File

@ -1,7 +1,7 @@
#include "Atlas.h" #include "Atlas.h"
#include <stdexcept> #include <stdexcept>
#include "../maths/LMPacker.h" #include "../../maths/LMPacker.h"
#include "Texture.h" #include "Texture.h"
#include "ImageData.h" #include "ImageData.h"

View File

@ -1,5 +1,5 @@
#ifndef GRAPHICS_ATLAS_H_ #ifndef GRAPHICS_CORE_ATLAS_H_
#define GRAPHICS_ATLAS_H_ #define GRAPHICS_CORE_ATLAS_H_
#include <set> #include <set>
#include <string> #include <string>
@ -7,7 +7,7 @@
#include <vector> #include <vector>
#include <unordered_map> #include <unordered_map>
#include "UVRegion.h" #include "UVRegion.h"
#include "../typedefs.h" #include "../../typedefs.h"
class ImageData; class ImageData;
class Texture; class Texture;
@ -45,4 +45,4 @@ public:
Atlas* build(uint extrusion, uint maxResolution=8192); Atlas* build(uint extrusion, uint maxResolution=8192);
}; };
#endif // GRAPHICS_ATLAS_H_ #endif // GRAPHICS_CORE_ATLAS_H_

View File

@ -1,5 +1,5 @@
#ifndef SRC_GRAPHICS_BATCH2D_H_ #ifndef GRAPHICS_CORE_BATCH2D_H_
#define SRC_GRAPHICS_BATCH2D_H_ #define GRAPHICS_CORE_BATCH2D_H_
#include <memory> #include <memory>
#include <stdlib.h> #include <stdlib.h>
@ -87,4 +87,4 @@ public:
void lineWidth(float width); void lineWidth(float width);
}; };
#endif /* SRC_GRAPHICS_BATCH2D_H_ */ #endif // GRAPHICS_CORE_BATCH2D_H_

View File

@ -4,7 +4,7 @@
#include "Texture.h" #include "Texture.h"
#include <GL/glew.h> #include <GL/glew.h>
#include "../typedefs.h" #include "../../typedefs.h"
inline constexpr uint B3D_VERTEX_SIZE = 9; inline constexpr uint B3D_VERTEX_SIZE = 9;

View File

@ -1,8 +1,8 @@
#ifndef GRAPHICS_BATCH3D_H_ #ifndef GRAPHICS_CORE_BATCH3D_H_
#define GRAPHICS_BATCH3D_H_ #define GRAPHICS_CORE_BATCH3D_H_
#include "UVRegion.h" #include "UVRegion.h"
#include "../typedefs.h" #include "../../typedefs.h"
#include <memory> #include <memory>
#include <stdlib.h> #include <stdlib.h>
@ -51,4 +51,4 @@ public:
void flushPoints(); void flushPoints();
}; };
#endif /* GRAPHICS_BATCH3D_H_ */ #endif // GRAPHICS_CORE_BATCH3D_H_

View File

@ -1,5 +1,5 @@
#ifndef GRAPHICS_CUBEMAP_H_ #ifndef GRAPHICS_CORE_CUBEMAP_H_
#define GRAPHICS_CUBEMAP_H_ #define GRAPHICS_CORE_CUBEMAP_H_
#include "Texture.h" #include "Texture.h"
@ -12,4 +12,4 @@ public:
virtual void unbind() override; virtual void unbind() override;
}; };
#endif // GRAPHICS_CUBEMAP_H_ #endif // GRAPHICS_CORE_CUBEMAP_H_

View File

@ -1,10 +1,10 @@
#ifndef GRAPHICS_FONT_H_ #ifndef GRAPHICS_CORE_FONT_H_
#define GRAPHICS_FONT_H_ #define GRAPHICS_CORE_FONT_H_
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include "../typedefs.h" #include "../../typedefs.h"
class Texture; class Texture;
class Batch2D; class Batch2D;
@ -40,4 +40,4 @@ public:
void draw(Batch2D* batch, std::wstring_view text, int x, int y, FontStyle style); void draw(Batch2D* batch, std::wstring_view text, int x, int y, FontStyle style);
}; };
#endif /* GRAPHICS_FONT_H_ */ #endif // GRAPHICS_CORE_FONT_H_

View File

@ -1,7 +1,7 @@
#ifndef SRC_GRAPHICS_FRAMEBUFFER_H_ #ifndef GRAPHICS_CORE_FRAMEBUFFER_H_
#define SRC_GRAPHICS_FRAMEBUFFER_H_ #define GRAPHICS_CORE_FRAMEBUFFER_H_
#include "../typedefs.h" #include "../../typedefs.h"
#include <memory> #include <memory>
@ -39,4 +39,4 @@ public:
uint getHeight() const; uint getHeight() const;
}; };
#endif /* SRC_GRAPHICS_FRAMEBUFFER_H_ */ #endif // GRAPHICS_CORE_FRAMEBUFFER_H_

View File

@ -1,9 +1,9 @@
#ifndef GRAPHICS_GFX_CONTEXT_H_ #ifndef GRAPHICS_CORE_GFX_CONTEXT_H_
#define GRAPHICS_GFX_CONTEXT_H_ #define GRAPHICS_CORE_GFX_CONTEXT_H_
#include "../typedefs.h"
#include "Viewport.h" #include "Viewport.h"
#include "../window/Window.h" #include "../../window/Window.h"
#include "../../typedefs.h"
class Batch2D; class Batch2D;
class Framebuffer; class Framebuffer;
@ -35,4 +35,4 @@ public:
void setScissors(glm::vec4 area); void setScissors(glm::vec4 area);
}; };
#endif // GRAPHICS_GFX_CONTEXT_H_ #endif // GRAPHICS_CORE_GFX_CONTEXT_H_

View File

@ -1,7 +1,7 @@
#ifndef GRAPHICS_IMAGE_DATA_H_ #ifndef GRAPHICS_CORE_IMAGE_DATA_H_
#define GRAPHICS_IMAGE_DATA_H_ #define GRAPHICS_CORE_IMAGE_DATA_H_
#include "../typedefs.h" #include "../../typedefs.h"
enum class ImageFormat { enum class ImageFormat {
rgb888, rgb888,
@ -46,4 +46,4 @@ public:
extern ImageData* add_atlas_margins(ImageData* image, int grid_size); extern ImageData* add_atlas_margins(ImageData* image, int grid_size);
#endif // GRAPHICS_IMAGE_DATA_H_ #endif // GRAPHICS_CORE_IMAGE_DATA_H_

View File

@ -1,5 +1,5 @@
#ifndef GRAPHICS_LINEBATCH_H_ #ifndef GRAPHICS_CORE_LINEBATCH_H_
#define GRAPHICS_LINEBATCH_H_ #define GRAPHICS_CORE_LINEBATCH_H_
#include <memory> #include <memory>
#include <stdlib.h> #include <stdlib.h>
@ -33,4 +33,4 @@ public:
void lineWidth(float width); void lineWidth(float width);
}; };
#endif /* GRAPHICS_LINEBATCH_H_ */ #endif // GRAPHICS_CORE_LINEBATCH_H_

View File

@ -1,8 +1,8 @@
#ifndef GRAPHICS_MESH_H_ #ifndef GRAPHICS_CORE_MESH_H_
#define GRAPHICS_MESH_H_ #define GRAPHICS_CORE_MESH_H_
#include <stdlib.h> #include <stdlib.h>
#include "../typedefs.h" #include "../../typedefs.h"
struct vattr { struct vattr {
ubyte size; ubyte size;
@ -39,4 +39,4 @@ public:
static int meshesCount; static int meshesCount;
}; };
#endif /* GRAPHICS_MESH_H_ */ #endif // GRAPHICS_CORE_MESH_H_

View File

@ -1,5 +1,5 @@
#ifndef GRAPHICS_POST_PROCESSING_H_ #ifndef GRAPHICS_CORE_POST_PROCESSING_H_
#define GRAPHICS_POST_PROCESSING_H_ #define GRAPHICS_CORE_POST_PROCESSING_H_
#include "Viewport.h" #include "Viewport.h"
#include "GfxContext.h" #include "GfxContext.h"
@ -34,4 +34,4 @@ public:
void render(const GfxContext& context, Shader* screenShader); void render(const GfxContext& context, Shader* screenShader);
}; };
#endif // GRAPHICS_POST_PROCESSING_H_ #endif // GRAPHICS_CORE_POST_PROCESSING_H_

View File

@ -4,13 +4,14 @@
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <filesystem>
#include <glm/gtc/type_ptr.hpp> #include <glm/gtc/type_ptr.hpp>
#include <GL/glew.h> #include <GL/glew.h>
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
#include "../coders/GLSLExtension.h" #include "../../coders/GLSLExtension.h"
namespace fs = std::filesystem; namespace fs = std::filesystem;

View File

@ -1,9 +1,9 @@
#ifndef GRAPHICS_SHADER_H_ #ifndef GRAPHICS_CORE_SHADER_H_
#define GRAPHICS_SHADER_H_ #define GRAPHICS_CORE_SHADER_H_
#include <string> #include <string>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "../typedefs.h" #include "../../typedefs.h"
class GLSLExtension; class GLSLExtension;
@ -33,4 +33,4 @@ public:
); );
}; };
#endif /* GRAPHICS_SHADER_H_ */ #endif // GRAPHICS_SHADER_H_

View File

@ -1,8 +1,8 @@
#ifndef GRAPHICS_TEXTURE_H_ #ifndef GRAPHICS_CORE_TEXTURE_H_
#define GRAPHICS_TEXTURE_H_ #define GRAPHICS_CORE_TEXTURE_H_
#include <string> #include <string>
#include "../typedefs.h" #include "../../typedefs.h"
#include "ImageData.h" #include "ImageData.h"
class Texture { class Texture {
@ -31,4 +31,4 @@ public:
static Texture* from(const ImageData* image); static Texture* from(const ImageData* image);
}; };
#endif /* GRAPHICS_TEXTURE_H_ */ #endif // GRAPHICS_CORE_TEXTURE_H_

View File

@ -1,7 +1,7 @@
#ifndef TEXTURE_ANIMATION_H #ifndef GRAPHICS_CORE_TEXTURE_ANIMATION_H_
#define TEXTURE_ANIMATION_H #define GRAPHICS_CORE_TEXTURE_ANIMATION_H_
#include "../typedefs.h" #include "../../typedefs.h"
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <vector> #include <vector>
@ -49,4 +49,4 @@ private:
std::vector<TextureAnimation> animations; std::vector<TextureAnimation> animations;
}; };
#endif // !TEXTURE_ANIMATION_H #endif // GRAPHICS_CORE_TEXTURE_ANIMATION_H_

View File

@ -1,5 +1,5 @@
#ifndef SRC_GRAPHICS_UVREGION_H_ #ifndef GRAPHICS_CORE_UVREGION_H_
#define SRC_GRAPHICS_UVREGION_H_ #define GRAPHICS_CORE_UVREGION_H_
class UVRegion { class UVRegion {
public: public:
@ -14,4 +14,4 @@ public:
UVRegion() : u1(0.0f), v1(0.0f), u2(1.0f), v2(1.0f){} UVRegion() : u1(0.0f), v1(0.0f), u2(1.0f), v2(1.0f){}
}; };
#endif /* SRC_GRAPHICS_UVREGION_H_ */ #endif // SRC_GRAPHICS_UVREGION_H_

View File

@ -1,9 +1,9 @@
#ifndef GRAPHICS_VIEWPORT_H_ #ifndef GRAPHICS_CORE_VIEWPORT_H_
#define GRAPHICS_VIEWPORT_H_ #define GRAPHICS_CORE_VIEWPORT_H_
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "../typedefs.h" #include "../../typedefs.h"
class Viewport { class Viewport {
uint width; uint width;

View File

@ -1,5 +1,5 @@
#ifndef GRAPHICS_GL_UTIL_H_ #ifndef GRAPHICS_CORE_GL_UTIL_H_
#define GRAPHICS_GL_UTIL_H_ #define GRAPHICS_CORE_GL_UTIL_H_
#include <GL/glew.h> #include <GL/glew.h>
@ -16,4 +16,4 @@ namespace gl {
} }
} }
#endif // GRAPHICS_GL_UTIL_H_ #endif // GRAPHICS_CORE_GL_UTIL_H_

View File

@ -11,7 +11,7 @@
#include "../voxels/ChunksStorage.h" #include "../voxels/ChunksStorage.h"
#include "../voxels/WorldGenerator.h" #include "../voxels/WorldGenerator.h"
#include "../world/WorldGenerators.h" #include "../world/WorldGenerators.h"
#include "../graphics/Mesh.h" #include "../graphics/core/Mesh.h"
#include "../lighting/Lighting.h" #include "../lighting/Lighting.h"
#include "../files/WorldFiles.h" #include "../files/WorldFiles.h"
#include "../world/Level.h" #include "../world/Level.h"

View File

@ -4,7 +4,9 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "../graphics/UVRegion.h"
// :<
#include "../graphics/core/UVRegion.h"
#include "../maths/aabb.h" #include "../maths/aabb.h"
#include "../typedefs.h" #include "../typedefs.h"

View File

@ -7,8 +7,7 @@
#include "../lighting/Lightmap.h" #include "../lighting/Lightmap.h"
#include "../files/WorldFiles.h" #include "../files/WorldFiles.h"
#include "../world/LevelEvents.h" #include "../world/LevelEvents.h"
#include "../graphics/core/Mesh.h"
#include "../graphics/Mesh.h"
#include "../maths/voxmaths.h" #include "../maths/voxmaths.h"
#include "../maths/aabb.h" #include "../maths/aabb.h"
#include "../maths/rays.h" #include "../maths/rays.h"

View File

@ -1,7 +1,7 @@
#include <iostream> #include <iostream>
#include "Window.h" #include "Window.h"
#include "Events.h" #include "Events.h"
#include "../graphics/ImageData.h" #include "../graphics/core/ImageData.h"
#include <GL/glew.h> #include <GL/glew.h>
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>