refactor WorldRenderer

This commit is contained in:
MihailRis
2024-11-13 03:35:49 +03:00
parent d8fe2f1531
commit a7833a780d
2 changed files with 39 additions and 38 deletions
+5 -5
View File
@@ -47,8 +47,8 @@ class WorldRenderer {
float timer = 0.0f;
bool drawChunk(size_t index, const Camera& camera, Shader* shader, bool culling);
void drawChunks(Chunks* chunks, const Camera& camera, Shader* shader);
bool drawChunk(size_t index, const Camera& camera, Shader& shader, bool culling);
void drawChunks(Chunks* chunks, const Camera& camera, Shader& shader);
/// @brief Render block selection lines
void renderBlockSelection();
@@ -59,7 +59,7 @@ class WorldRenderer {
/// @param camera active camera
/// @param linesShader shader used
void renderLines(
const Camera& camera, Shader* linesShader, const DrawContext& pctx
const Camera& camera, Shader& linesShader, const DrawContext& pctx
);
/// @brief Render all debug lines (chunks borders, coord system guides)
@@ -69,13 +69,13 @@ class WorldRenderer {
void renderDebugLines(
const DrawContext& context,
const Camera& camera,
Shader* linesShader
Shader& linesShader
);
void renderBlockOverlay(const DrawContext& context, const Assets& assets);
void setupWorldShader(
Shader* shader,
Shader& shader,
const Camera& camera,
const EngineSettings& settings,
float fogFactor