frontend/graphics moved to graphics/render
This commit is contained in:
parent
5393977e57
commit
258666c377
@ -5,36 +5,36 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <assert.h>
|
#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 "../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 "../logic/PlayerController.h"
|
||||||
#include "../maths/FrustumCulling.h"
|
#include "../maths/FrustumCulling.h"
|
||||||
#include "../maths/voxmaths.h"
|
#include "../maths/voxmaths.h"
|
||||||
|
#include "../objects/Player.h"
|
||||||
#include "../settings.h"
|
#include "../settings.h"
|
||||||
#include "../engine.h"
|
#include "../voxels/Block.h"
|
||||||
#include "../items/ItemDef.h"
|
#include "../voxels/Chunk.h"
|
||||||
#include "../items/ItemStack.h"
|
#include "../voxels/Chunks.h"
|
||||||
#include "../items/Inventory.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 "LevelFrontend.h"
|
||||||
#include "graphics/Skybox.h"
|
|
||||||
#include "graphics/ChunksRenderer.h"
|
|
||||||
|
|
||||||
WorldRenderer::WorldRenderer(Engine* engine, LevelFrontend* frontend, Player* player)
|
WorldRenderer::WorldRenderer(Engine* engine, LevelFrontend* frontend, Player* player)
|
||||||
: engine(engine),
|
: engine(engine),
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
#include "../../graphics/core/Mesh.h"
|
#include "../core/Mesh.h"
|
||||||
#include "../../graphics/core/UVRegion.h"
|
#include "../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"
|
||||||
@ -20,17 +20,19 @@ using glm::vec4;
|
|||||||
const uint BlocksRenderer::VERTEX_SIZE = 6;
|
const uint BlocksRenderer::VERTEX_SIZE = 6;
|
||||||
const vec3 BlocksRenderer::SUN_VECTOR (0.411934f, 0.863868f, -0.279161f);
|
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 Content* content,
|
||||||
const ContentGfxCache* cache,
|
const ContentGfxCache* cache,
|
||||||
const EngineSettings& settings)
|
const EngineSettings& settings
|
||||||
: content(content),
|
) : content(content),
|
||||||
vertexOffset(0),
|
vertexOffset(0),
|
||||||
indexOffset(0),
|
indexOffset(0),
|
||||||
indexSize(0),
|
indexSize(0),
|
||||||
capacity(capacity),
|
capacity(capacity),
|
||||||
cache(cache),
|
cache(cache),
|
||||||
settings(settings) {
|
settings(settings)
|
||||||
|
{
|
||||||
vertexBuffer = new float[capacity];
|
vertexBuffer = new float[capacity];
|
||||||
indexBuffer = new int[capacity];
|
indexBuffer = new int[capacity];
|
||||||
voxelsBuffer = new VoxelsVolume(CHUNK_W + 2, CHUNK_H, CHUNK_D + 2);
|
voxelsBuffer = new VoxelsVolume(CHUNK_W + 2, CHUNK_H, CHUNK_D + 2);
|
||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef GRAPHICS_BLOCKS_RENDERER_H
|
#ifndef GRAPHICS_RENDER_BLOCKS_RENDERER_H
|
||||||
#define GRAPHICS_BLOCKS_RENDERER_H
|
#define GRAPHICS_RENDER_BLOCKS_RENDERER_H
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -99,4 +99,4 @@ public:
|
|||||||
VoxelsVolume* getVoxelsBuffer() const;
|
VoxelsVolume* getVoxelsBuffer() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GRAPHICS_BLOCKS_RENDERER_H
|
#endif // GRAPHICS_RENDER_BLOCKS_RENDERER_H
|
||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef SRC_GRAPHICS_CHUNKSRENDERER_H_
|
#ifndef GRAPHICS_RENDER_CHUNKSRENDERER_H_
|
||||||
#define SRC_GRAPHICS_CHUNKSRENDERER_H_
|
#define GRAPHICS_RENDER_CHUNKSRENDERER_H_
|
||||||
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@ -64,4 +64,4 @@ public:
|
|||||||
void update();
|
void update();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SRC_GRAPHICS_CHUNKSRENDERER_H_
|
#endif // GRAPHICS_RENDER_CHUNKSRENDERER_H_
|
||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef FRONTEND_GRAPHICS_SKYBOX_H_
|
#ifndef GRAPHICS_RENDER_SKYBOX_H_
|
||||||
#define FRONTEND_GRAPHICS_SKYBOX_H_
|
#define GRAPHICS_RENDER_SKYBOX_H_
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -55,4 +55,4 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FRONTEND_GRAPHICS_SKYBOX_H_
|
#endif // GRAPHICS_RENDER_SKYBOX_H_
|
||||||
Loading…
x
Reference in New Issue
Block a user