From 848d1210995af14f271e0391a7f202ac234fa31f Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 22 Jun 2024 21:35:21 +0300 Subject: [PATCH] remove test code --- src/graphics/render/WorldRenderer.cpp | 15 +-------------- src/graphics/render/WorldRenderer.hpp | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/graphics/render/WorldRenderer.cpp b/src/graphics/render/WorldRenderer.cpp index efb03d80..a09a33b3 100644 --- a/src/graphics/render/WorldRenderer.cpp +++ b/src/graphics/render/WorldRenderer.cpp @@ -7,12 +7,10 @@ #include "../../assets/Assets.hpp" #include "../../content/Content.hpp" #include "../../engine.hpp" -#include "../../coders/obj.hpp" #include "../../frontend/LevelFrontend.hpp" #include "../../items/Inventory.hpp" #include "../../items/ItemDef.hpp" #include "../../items/ItemStack.hpp" -#include "../../files/files.hpp" #include "../../logic/PlayerController.hpp" #include "../../maths/FrustumCulling.hpp" #include "../../maths/voxmaths.hpp" @@ -72,10 +70,6 @@ WorldRenderer::WorldRenderer(Engine* engine, LevelFrontend* frontend, Player* pl settings.graphics.skyboxResolution.get(), assets->getShader("skybox_gen") ); - - auto name = "dingus.obj"; - auto text = files::read_string(fs::path(name)); - model = obj::parse(name, text); } WorldRenderer::~WorldRenderer() { @@ -200,15 +194,8 @@ void WorldRenderer::renderLevel( drawChunks(level->chunks.get(), camera, shader); - float timer = static_cast(Window::time()); shader->uniformMatrix("u_model", glm::mat4(1.0f)); - modelBatch->translate({0, 85, 0}); - //modelBatch->scale(glm::vec3(glm::sin(timer*6)+10)); - modelBatch->rotate(glm::vec3(0, 1, 0), timer*6); - modelBatch->draw(*model); - //modelBatch->popMatrix(); - modelBatch->popMatrix(); - modelBatch->popMatrix(); + /// draw models here skybox->unbind(); } diff --git a/src/graphics/render/WorldRenderer.hpp b/src/graphics/render/WorldRenderer.hpp index b6b5dd27..af8eeaff 100644 --- a/src/graphics/render/WorldRenderer.hpp +++ b/src/graphics/render/WorldRenderer.hpp @@ -41,7 +41,6 @@ class WorldRenderer { std::unique_ptr batch3d; std::unique_ptr modelBatch; - std::unique_ptr model; bool drawChunk(size_t index, Camera* camera, Shader* shader, bool culling); void drawChunks(Chunks* chunks, Camera* camera, Shader* shader);