General refactor

This commit is contained in:
MihailRis 2023-11-30 04:30:40 +03:00
parent de134dc2e5
commit 1d5037893c
27 changed files with 558 additions and 419 deletions

View file

@ -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