diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index b7f0514d..30d61c0b 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -131,13 +131,18 @@ int ApplicationMain(int argc, char* argv[]) } WindowTheming::SetWindowDarkMode(window); + Logger::Log("Creating editor ", "window", CRITICAL); // Initialize Editor Nuake::EditorInterface editor; + Logger::Log("Created editor ", "window", CRITICAL); // Load project in argument if (!launchSettings.projectPath.empty()) { - editor.LoadProject(launchSettings.projectPath); + Logger::Log("Loading project", "window", CRITICAL); + + + editor.LoadProject(launchSettings.projectPath); } // Start application main loop @@ -192,20 +197,22 @@ int ApplicationMain(int argc, char* argv[]) return 0; } + + +#ifdef NK_WIN #ifdef NK_DIST - #include "windows.h" - int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cdmline, int cmdshow) { return ApplicationMain(__argc, __argv); } +#endif +#endif -#else int main(int argc, char* argv[]) { return ApplicationMain(argc, argv); } -#endif + diff --git a/Editor/imgtool64.exe b/Editor/imgtool64.exe deleted file mode 100644 index f1e5680e..00000000 Binary files a/Editor/imgtool64.exe and /dev/null differ diff --git a/Editor/src/Misc/GizmoDrawer.cpp b/Editor/src/Misc/GizmoDrawer.cpp index 55b058b0..12e63274 100644 --- a/Editor/src/Misc/GizmoDrawer.cpp +++ b/Editor/src/Misc/GizmoDrawer.cpp @@ -76,7 +76,6 @@ GizmoDrawer::GizmoDrawer() mBoxBuffer->AddBuffer(*mBoxVertexBuffer, *vblayout); - // Load gizmos ModelLoader loader; _gizmos = std::map>(); @@ -89,6 +88,7 @@ void GizmoDrawer::GenerateSphereGizmo() { const float subDivision = 32.0f; + constexpr const float pi = glm::pi() * 4.0; float increment = pi / subDivision; for (int i = 0; i < subDivision * 2.0; i++) diff --git a/Nuake/src/Vendors/imgui/imgui_widgets.cpp b/Nuake/src/Vendors/imgui/imgui_widgets.cpp index 3ae86a0c..df53f697 100644 --- a/Nuake/src/Vendors/imgui/imgui_widgets.cpp +++ b/Nuake/src/Vendors/imgui/imgui_widgets.cpp @@ -6549,7 +6549,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl if (hovered || selected) { const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header); - RenderFrame(bb.Min, bb.Max, col, false, 0.0f); + RenderFrame(bb.Min, bb.Max, col, false, 8.0f); } RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_TypeThin | ImGuiNavHighlightFlags_NoRounding); diff --git a/Nuake/src/Window.cpp b/Nuake/src/Window.cpp index c04880a2..8f542933 100644 --- a/Nuake/src/Window.cpp +++ b/Nuake/src/Window.cpp @@ -1,7 +1,7 @@ #include "Window.h" -#include +#include #include #include "Engine.h" @@ -67,18 +67,17 @@ namespace Nuake } SetWindowIcon("resources/Images/nuake-logo.png"); - glfwMakeContextCurrent(m_Window); SetVSync(false); - Logger::Log("Driver detected " + std::string(((char*)glGetString(GL_VERSION))), "renderer"); - - if (glewInit() != GLEW_OK) + if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { - Logger::Log("GLEW initialization failed!", "window", CRITICAL); + Logger::Log("glad initialization failed!", "window", CRITICAL); return -1; } + Logger::Log("Driver detected " + std::string(((char*)glGetString(GL_VERSION))), "renderer"); + if (glfwRawMouseMotionSupported()) glfwSetInputMode(m_Window, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE); @@ -105,6 +104,7 @@ namespace Nuake InitImgui(); + Logger::Log("ImGui initialized ", "renderer"); return 0; } @@ -284,13 +284,13 @@ namespace Nuake s.WindowMenuButtonPosition = ImGuiDir_None; s.GrabRounding = 2.0f; s.CellPadding = ImVec2(8, 8); - s.WindowPadding = ImVec2(2, 2); + s.WindowPadding = ImVec2(4, 4); s.ScrollbarRounding = 9.0f; s.ScrollbarSize = 15.0f; s.GrabMinSize = 32.0f; s.TabRounding = 0; - s.WindowRounding = 0; - s.ChildRounding = 0; + s.WindowRounding = 4.0f; + s.ChildRounding = 4.0f; s.FrameRounding = 4.0f; s.GrabRounding = 0; s.FramePadding = ImVec2(8, 4); @@ -301,7 +301,7 @@ namespace Nuake s.IndentSpacing = 12.0f; s.ChildBorderSize = 0.0f; s.PopupRounding = 4.0f; - s.FrameBorderSize = 1.0f; + s.FrameBorderSize = 0.0f; ImVec4* colors = ImGui::GetStyle().Colors; colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); diff --git a/Resources/Shaders/volumetric.shader b/Resources/Shaders/volumetric.shader index b005ee52..6b717c08 100644 --- a/Resources/Shaders/volumetric.shader +++ b/Resources/Shaders/volumetric.shader @@ -38,6 +38,7 @@ uniform float u_FogAmount; const int MAX_LIGHT = 20; uniform int u_LightCount; + struct Light { mat4 transform; vec3 color;