remove test code

This commit is contained in:
MihailRis 2024-06-22 21:35:21 +03:00
parent e4f9bd03b7
commit 848d121099
2 changed files with 1 additions and 15 deletions

View File

@ -7,12 +7,10 @@
#include "../../assets/Assets.hpp" #include "../../assets/Assets.hpp"
#include "../../content/Content.hpp" #include "../../content/Content.hpp"
#include "../../engine.hpp" #include "../../engine.hpp"
#include "../../coders/obj.hpp"
#include "../../frontend/LevelFrontend.hpp" #include "../../frontend/LevelFrontend.hpp"
#include "../../items/Inventory.hpp" #include "../../items/Inventory.hpp"
#include "../../items/ItemDef.hpp" #include "../../items/ItemDef.hpp"
#include "../../items/ItemStack.hpp" #include "../../items/ItemStack.hpp"
#include "../../files/files.hpp"
#include "../../logic/PlayerController.hpp" #include "../../logic/PlayerController.hpp"
#include "../../maths/FrustumCulling.hpp" #include "../../maths/FrustumCulling.hpp"
#include "../../maths/voxmaths.hpp" #include "../../maths/voxmaths.hpp"
@ -72,10 +70,6 @@ WorldRenderer::WorldRenderer(Engine* engine, LevelFrontend* frontend, Player* pl
settings.graphics.skyboxResolution.get(), settings.graphics.skyboxResolution.get(),
assets->getShader("skybox_gen") assets->getShader("skybox_gen")
); );
auto name = "dingus.obj";
auto text = files::read_string(fs::path(name));
model = obj::parse(name, text);
} }
WorldRenderer::~WorldRenderer() { WorldRenderer::~WorldRenderer() {
@ -200,15 +194,8 @@ void WorldRenderer::renderLevel(
drawChunks(level->chunks.get(), camera, shader); drawChunks(level->chunks.get(), camera, shader);
float timer = static_cast<float>(Window::time());
shader->uniformMatrix("u_model", glm::mat4(1.0f)); shader->uniformMatrix("u_model", glm::mat4(1.0f));
modelBatch->translate({0, 85, 0}); /// draw models here
//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();
skybox->unbind(); skybox->unbind();
} }

View File

@ -41,7 +41,6 @@ class WorldRenderer {
std::unique_ptr<Batch3D> batch3d; std::unique_ptr<Batch3D> batch3d;
std::unique_ptr<ModelBatch> modelBatch; std::unique_ptr<ModelBatch> modelBatch;
std::unique_ptr<model::Model> model;
bool drawChunk(size_t index, Camera* camera, Shader* shader, bool culling); bool drawChunk(size_t index, Camera* camera, Shader* shader, bool culling);
void drawChunks(Chunks* chunks, Camera* camera, Shader* shader); void drawChunks(Chunks* chunks, Camera* camera, Shader* shader);