diff --git a/imgui.ini b/imgui.ini index b2668ba..f3256f8 100644 --- a/imgui.ini +++ b/imgui.ini @@ -193,7 +193,7 @@ DockSpace ID=0x14621557 Window=0x3DA2F1DE Pos=8,51 Size= DockNode ID=0x00000017 Parent=0x0000000D SizeRef=1202,776 Split=Y Selected=0xDFF75B3F DockNode ID=0x0000001D Parent=0x00000017 SizeRef=518,720 Split=Y Selected=0x9A7B23B9 DockNode ID=0x0000001F Parent=0x0000001D SizeRef=549,359 CentralNode=1 HiddenTabBar=1 Selected=0x9A7B23B9 - DockNode ID=0x00000025 Parent=0x0000001D SizeRef=549,323 Selected=0x7A66B86B + DockNode ID=0x00000025 Parent=0x0000001D SizeRef=549,323 Selected=0x1F29F1F5 DockNode ID=0x0000001E Parent=0x00000017 SizeRef=518,417 Selected=0xC74E1AEE DockNode ID=0x00000018 Parent=0x0000000D SizeRef=1202,364 Split=X Selected=0x1C0788A1 DockNode ID=0x00000019 Parent=0x00000018 SizeRef=601,364 Selected=0x1C0788A1 diff --git a/src/Engine.cpp b/src/Engine.cpp index 35a3994..39b77a1 100644 --- a/src/Engine.cpp +++ b/src/Engine.cpp @@ -41,7 +41,6 @@ // #define YAML_CPP_STATIC_DEFINE #include -#include "TestModel.h" AssetManager g_AssetManager; @@ -443,13 +442,15 @@ void MyEngine::ShowDockSpace() if (ImGui::BeginMenu("Settings")) { // A checkbox to enable/disable bounding boxes - ImGui::Checkbox("Show Box's", &DrawBBBO); + ImGui::Checkbox("Show Submeshs", &DrawBBBO); // On the same line, we place a small color edit widget ImGui::SameLine(); ImGui::ColorEdit4("Box Color", reinterpret_cast(&g_SettingsManager.S_LineColor), ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel); + + // Explanation of Flags: // - ImGuiColorEditFlags_NoInputs hides numeric RGBA input fields // - ImGuiColorEditFlags_NoLabel hides the default label, since we already have "Box Color" diff --git a/src/Engine.h b/src/Engine.h index b366036..da0dc81 100644 --- a/src/Engine.h +++ b/src/Engine.h @@ -22,7 +22,6 @@ #include "Engine/LuaAPI.h" #include "Engine/Utilitys.h" -#include "TestModel.h" #include "gcml.h" diff --git a/src/TestModel.cpp b/src/TestModel.cpp deleted file mode 100644 index 712144a..0000000 --- a/src/TestModel.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#include "TestModel.h" -#include -#include - - -GLuint CreateCubeVAO() -{ - // Define cube vertices (Position + UVs) - static float g_CubeVertices[] = - { - // Front face - -1.f, -1.f, 1.f, 0.f, 0.f, - 1.f, -1.f, 1.f, 1.f, 0.f, - 1.f, 1.f, 1.f, 1.f, 1.f, - -1.f, 1.f, 1.f, 0.f, 1.f, - - // Back face - -1.f, -1.f, -1.f, 1.f, 0.f, - 1.f, -1.f, -1.f, 0.f, 0.f, - 1.f, 1.f, -1.f, 0.f, 1.f, - -1.f, 1.f, -1.f, 1.f, 1.f, - - // Left face - -1.f, -1.f, -1.f, 0.f, 0.f, - -1.f, -1.f, 1.f, 1.f, 0.f, - -1.f, 1.f, 1.f, 1.f, 1.f, - -1.f, 1.f, -1.f, 0.f, 1.f, - - // Right face - 1.f, -1.f, -1.f, 1.f, 0.f, - 1.f, -1.f, 1.f, 0.f, 0.f, - 1.f, 1.f, 1.f, 0.f, 1.f, - 1.f, 1.f, -1.f, 1.f, 1.f, - - // Top face - -1.f, 1.f, -1.f, 0.f, 0.f, - 1.f, 1.f, -1.f, 1.f, 0.f, - 1.f, 1.f, 1.f, 1.f, 1.f, - -1.f, 1.f, 1.f, 0.f, 1.f, - - // Bottom face - -1.f, -1.f, -1.f, 1.f, 0.f, - 1.f, -1.f, -1.f, 0.f, 0.f, - 1.f, -1.f, 1.f, 0.f, 1.f, - -1.f, -1.f, 1.f, 1.f, 1.f, - }; - - // Define cube indices - static unsigned int g_CubeIndices[] = - { - // Front face - 0, 1, 2, 2, 3, 0, - // Back face - 4, 5, 6, 6, 7, 4, - // Left face - 8, 9, 10, 10, 11, 8, - // Right face - 12, 13, 14, 14, 15, 12, - // Top face - 16, 17, 18, 18, 19, 16, - // Bottom face - 20, 21, 22, 22, 23, 20 - }; - - GLuint VAO, VBO, EBO; - - // Generate and bind VAO - glGenVertexArrays(1, &VAO); - glBindVertexArray(VAO); - - // Generate and bind VBO - glGenBuffers(1, &VBO); - glBindBuffer(GL_ARRAY_BUFFER, VBO); - glBufferData(GL_ARRAY_BUFFER, sizeof(g_CubeVertices), g_CubeVertices, GL_STATIC_DRAW); - - // Generate and bind EBO - glGenBuffers(1, &EBO); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, EBO); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(g_CubeIndices), g_CubeIndices, GL_STATIC_DRAW); - - // Define vertex attributes - // Position attribute (location = 0) - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, - 5 * sizeof(float), (void*)0); - glEnableVertexAttribArray(0); - - // UV attribute (location = 1) - glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, - 5 * sizeof(float), (void*)(3 * sizeof(float))); - glEnableVertexAttribArray(1); - - // Unbind VAO (not EBO!) - glBindVertexArray(0); - - // Optionally, unbind VBO and EBO for cleanliness - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - - // Debug: Print VAO ID - printf("[MeshUtils] Initialized CubeVAO with ID: %u\n", VAO); - - return VAO; -} \ No newline at end of file diff --git a/src/TestModel.h b/src/TestModel.h deleted file mode 100644 index 887a049..0000000 --- a/src/TestModel.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once // -#include -#include - - -GLuint CreateCubeVAO(); \ No newline at end of file diff --git a/src/Windows/SceneWindow.cpp b/src/Windows/SceneWindow.cpp index 5681d10..611d9f2 100644 --- a/src/Windows/SceneWindow.cpp +++ b/src/Windows/SceneWindow.cpp @@ -4,7 +4,6 @@ // Include your asset manager and any other necessary headers #include "Engine/AssetManager.h" -#include "TestModel.h" #include "gcml.h" #include "Engine/ScopedTimer.h"