frontend/graphics moved to graphics/render

This commit is contained in:
MihailRis 2024-03-19 00:34:43 +03:00
parent 5393977e57
commit 258666c377
7 changed files with 41 additions and 39 deletions

View File

@ -5,36 +5,36 @@
#include <memory>
#include <assert.h>
#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),

View File

@ -2,8 +2,8 @@
#include <glm/glm.hpp>
#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);

View File

@ -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 <stdlib.h>
#include <vector>
@ -99,4 +99,4 @@ public:
VoxelsVolume* getVoxelsBuffer() const;
};
#endif // GRAPHICS_BLOCKS_RENDERER_H
#endif // GRAPHICS_RENDER_BLOCKS_RENDERER_H

View File

@ -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 <queue>
#include <mutex>
@ -64,4 +64,4 @@ public:
void update();
};
#endif // SRC_GRAPHICS_CHUNKSRENDERER_H_
#endif // GRAPHICS_RENDER_CHUNKSRENDERER_H_

View File

@ -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 <memory>
#include <string>
@ -55,4 +55,4 @@ public:
}
};
#endif // FRONTEND_GRAPHICS_SKYBOX_H_
#endif // GRAPHICS_RENDER_SKYBOX_H_