mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
General refactor
This commit is contained in:
parent
de134dc2e5
commit
1d5037893c
27 changed files with 558 additions and 419 deletions
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef WORLD_RENDERER_CPP
|
||||
#define WORLD_RENDERER_CPP
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <GL/glew.h>
|
||||
#include <string>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/ext.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
|
||||
#include "../graphics/GfxContext.h"
|
||||
|
||||
class Level;
|
||||
class Camera;
|
||||
class LineBatch;
|
||||
class ChunksRenderer;
|
||||
class Shader;
|
||||
class Texture;
|
||||
class Frustum;
|
||||
class Engine;
|
||||
class Chunks;
|
||||
class ContentGfxCache;
|
||||
class Skybox;
|
||||
|
||||
class WorldRenderer {
|
||||
Engine* engine;
|
||||
Level* level;
|
||||
Frustum* frustumCulling;
|
||||
LineBatch* lineBatch;
|
||||
ChunksRenderer* renderer;
|
||||
Skybox* skybox;
|
||||
bool drawChunk(size_t index, Camera* camera, Shader* shader, bool occlusion);
|
||||
void drawChunks(Chunks* chunks, Camera* camera, Shader* shader, bool occlusion);
|
||||
public:
|
||||
WorldRenderer(Engine* engine, Level* level, const ContentGfxCache* cache);
|
||||
~WorldRenderer();
|
||||
|
||||
void draw(const GfxContext& context, Camera* camera, bool occlusion);
|
||||
void drawDebug(const GfxContext& context, Camera* camera);
|
||||
};
|
||||
|
||||
|
||||
#endif // WORLD_RENDERER_CPP
|
||||
Loading…
Add table
Add a link
Reference in a new issue