diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index 46e478d..1c54b57 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -4,20 +4,14 @@ SET(FETCHCONTENT_QUIET OFF) SET(FETCHCONTENT_UPDATES_DISCONNECTED ON) ############################################################################### -# dv_gui_opengl - -SET(DV_GUI_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) -SET(DV_GUI_BUILD_OPENGL2 OFF CACHE BOOL "" FORCE) -SET(DV_GUI_BUILD_OPENGL3 ON CACHE BOOL "" FORCE) +# libgui FetchContent_Declare( - dv_gui_opengl - URL https://github.com/dvsku/dv_gui_opengl/archive/d8a0c3459843a86e6f09a05df67fe8526b6d883c.zip + libgui + URL https://github.com/dvsku/libgui/archive/refs/heads/master.zip ) -FetchContent_MakeAvailable(dv_gui_opengl) - -SET(DV_GUI_INCLUDES "${dv_gui_opengl_SOURCE_DIR}/include" PARENT_SCOPE) +FetchContent_MakeAvailable(libgui) ############################################################################### # devue_plugin_core diff --git a/source/devue_app/src/devue_app.cpp b/source/devue_app/src/devue_app.cpp index 90f7786..9e8366a 100644 --- a/source/devue_app/src/devue_app.cpp +++ b/source/devue_app/src/devue_app.cpp @@ -4,12 +4,12 @@ using namespace devue; using namespace devue::core; INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow) { - dvsku::dv_util_log::settings log_settings; - log_settings.level = dvsku::dv_util_log::level::debug; + dvsku::util_log::settings log_settings; + log_settings.level = dvsku::util_log::level::debug; - dvsku::dv_util_log::init(log_settings); + dvsku::util_log::init(log_settings); - dvsku::dv_window_settings settings; + dvsku::gui_window_settings settings; settings.width = 1360U; settings.height = 768U; settings.title = "devue"; diff --git a/source/devue_app/src/dv_app.cpp b/source/devue_app/src/dv_app.cpp index 4ba6bcd..6fc0179 100644 --- a/source/devue_app/src/dv_app.cpp +++ b/source/devue_app/src/dv_app.cpp @@ -14,8 +14,8 @@ using namespace dvsku; /////////////////////////////////////////////////////////////////////////////// // PUBLIC -dv_app::dv_app(const dvsku::dv_window_settings& settings) - : dv_window(settings), m_components(&m_systems) +dv_app::dv_app(const dvsku::gui_window_settings& settings) + : gui_window(settings), m_components(&m_systems) { m_scene_render_target = std::make_shared(settings.width, settings.height); } @@ -422,7 +422,7 @@ dvsku::uuid dv_app::create_checkerboard_texture() { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, }; - dvsku::uuid uuid = dv_util_uuid::create("checkerboard"); + dvsku::uuid uuid = util_uuid::create("checkerboard"); try { if (m_systems.texture.textures.contains(uuid)) diff --git a/source/devue_app/src/dv_app.hpp b/source/devue_app/src/dv_app.hpp index b6e6507..679b77c 100644 --- a/source/devue_app/src/dv_app.hpp +++ b/source/devue_app/src/dv_app.hpp @@ -3,13 +3,13 @@ #include "systems/dv_systems.hpp" #include "rendering/dv_render_target.hpp" -#include +#include #include namespace devue { - class dv_app : public dvsku::dv_window { + class dv_app : public dvsku::gui_window { public: - dv_app(const dvsku::dv_window_settings& settings); + dv_app(const dvsku::gui_window_settings& settings); ~dv_app(); private: diff --git a/source/devue_app/src/gui/base/dv_comp.hpp b/source/devue_app/src/gui/base/dv_comp.hpp index 2e8f69a..757b794 100644 --- a/source/devue_app/src/gui/base/dv_comp.hpp +++ b/source/devue_app/src/gui/base/dv_comp.hpp @@ -2,7 +2,7 @@ #include "systems/dv_systems.hpp" -#include +#include #include #include #include diff --git a/source/devue_app/src/gui/components/dv_comp_console.cpp b/source/devue_app/src/gui/components/dv_comp_console.cpp index 25d123d..4c2e97c 100644 --- a/source/devue_app/src/gui/components/dv_comp_console.cpp +++ b/source/devue_app/src/gui/components/dv_comp_console.cpp @@ -6,14 +6,14 @@ using namespace devue; dv_comp_console::dv_comp_console(dv_systems* systems, dv_components* components) : dv_comp(systems, components) { - dvsku::dv_util_log::create_source("gui_console", &m_text); + dvsku::util_log::create_source("gui_console", &m_text); } dv_comp_console::~dv_comp_console() { - dvsku::dv_util_log::remove_source("gui_console"); + dvsku::util_log::remove_source("gui_console"); } -dvsku::dv_command_state dv_comp_console::render() { +dvsku::gui_command_state dv_comp_console::render() { bool* visible = &m_systems->command.is_set_to_execute(dv_commands::flag_show_console); if(ImGui::Begin("Console##Window", visible, ImGuiWindowFlags_HorizontalScrollbar)) { @@ -22,5 +22,5 @@ dvsku::dv_command_state dv_comp_console::render() { } ImGui::End(); - return dvsku::dv_command_state::repeat; + return dvsku::gui_command_state::repeat; } diff --git a/source/devue_app/src/gui/components/dv_comp_console.hpp b/source/devue_app/src/gui/components/dv_comp_console.hpp index 9e8b267..cfe9336 100644 --- a/source/devue_app/src/gui/components/dv_comp_console.hpp +++ b/source/devue_app/src/gui/components/dv_comp_console.hpp @@ -12,7 +12,7 @@ namespace devue { ~dv_comp_console(); public: - dvsku::dv_command_state render(); + dvsku::gui_command_state render(); private: std::stringstream m_text; diff --git a/source/devue_app/src/gui/components/dv_comp_texture.cpp b/source/devue_app/src/gui/components/dv_comp_texture.cpp index 8d36530..7fc3442 100644 --- a/source/devue_app/src/gui/components/dv_comp_texture.cpp +++ b/source/devue_app/src/gui/components/dv_comp_texture.cpp @@ -7,7 +7,7 @@ using namespace devue; dv_comp_texture::dv_comp_texture(dv_systems* systems, dv_components* components) : dv_comp(systems, components) {} -dvsku::dv_command_state dv_comp_texture::render() { +dvsku::gui_command_state dv_comp_texture::render() { bool* visible = &m_systems->command.is_set_to_execute(dv_commands::flag_show_texture); std::string name = m_texture_name.empty() ? @@ -55,7 +55,7 @@ dvsku::dv_command_state dv_comp_texture::render() { m_requested_focus = false; } - return dvsku::dv_command_state::repeat; + return dvsku::gui_command_state::repeat; } void dv_comp_texture::set_texture(dvsku::uuid uuid, const std::string& name) { diff --git a/source/devue_app/src/gui/components/dv_comp_texture.hpp b/source/devue_app/src/gui/components/dv_comp_texture.hpp index 68d6e4c..c7f4f85 100644 --- a/source/devue_app/src/gui/components/dv_comp_texture.hpp +++ b/source/devue_app/src/gui/components/dv_comp_texture.hpp @@ -11,7 +11,7 @@ namespace devue { dv_comp_texture(dv_systems* systems, dv_components* components); public: - dvsku::dv_command_state render(); + dvsku::gui_command_state render(); void set_texture(dvsku::uuid uuid, const std::string& name); private: diff --git a/source/devue_app/src/gui/modals/dv_modal_about.cpp b/source/devue_app/src/gui/modals/dv_modal_about.cpp index ff07b41..794818f 100644 --- a/source/devue_app/src/gui/modals/dv_modal_about.cpp +++ b/source/devue_app/src/gui/modals/dv_modal_about.cpp @@ -8,7 +8,7 @@ using namespace devue; dv_modal_about::dv_modal_about(dv_systems* systems, dv_components* components) : dv_comp(systems, components) {} -dvsku::dv_command_state dv_modal_about::render() { +dvsku::gui_command_state dv_modal_about::render() { bool* visible = &m_systems->command.is_set_to_execute(dv_commands::flag_show_modal_about); ImVec2 pos = ImGui::GetMainViewport()->GetCenter(); @@ -37,5 +37,5 @@ dvsku::dv_command_state dv_modal_about::render() { ImGui::EndPopup(); } - return dvsku::dv_command_state::repeat; + return dvsku::gui_command_state::repeat; } diff --git a/source/devue_app/src/gui/modals/dv_modal_about.hpp b/source/devue_app/src/gui/modals/dv_modal_about.hpp index 371f1fa..1d30bf5 100644 --- a/source/devue_app/src/gui/modals/dv_modal_about.hpp +++ b/source/devue_app/src/gui/modals/dv_modal_about.hpp @@ -9,6 +9,6 @@ namespace devue { dv_modal_about(dv_systems* systems, dv_components* components); public: - dvsku::dv_command_state render(); + dvsku::gui_command_state render(); }; } \ No newline at end of file diff --git a/source/devue_app/src/gui/modals/dv_modal_import.cpp b/source/devue_app/src/gui/modals/dv_modal_import.cpp index 6f71cdd..23aaa84 100644 --- a/source/devue_app/src/gui/modals/dv_modal_import.cpp +++ b/source/devue_app/src/gui/modals/dv_modal_import.cpp @@ -19,8 +19,8 @@ void dv_modal_import::set_materials_path(const std::string& path) { m_materials_path = path; } -dvsku::dv_command_state dv_modal_import::render() { - dvsku::dv_command_state status = dvsku::dv_command_state::repeat; +dvsku::gui_command_state dv_modal_import::render() { + dvsku::gui_command_state status = dvsku::gui_command_state::repeat; ImGui::OpenPopup("Import##Popup"); @@ -43,7 +43,7 @@ dvsku::dv_command_state dv_modal_import::render() { ImGui::SameLine(); if (ImGui::Button("Select##File", ImVec2(120, 0))) { - auto selected = dvsku::dv_util_dialog::open_file("Import model", m_file_path, m_systems->plugin.get_model_file_types()); + auto selected = dvsku::util_dialog::open_file("Import model", m_file_path, m_systems->plugin.get_model_file_types()); // By default set texture folder to be the same // as the file @@ -57,7 +57,7 @@ dvsku::dv_command_state dv_modal_import::render() { ImGui::SameLine(); if (ImGui::Button("Select##Materials", ImVec2(120, 0))) { - std::string dir = dvsku::dv_util_dialog::select_dir("Select material folder", m_materials_path); + std::string dir = dvsku::util_dialog::select_dir("Select material folder", m_materials_path); if (!dir.empty()) set_materials_path(dir); @@ -78,7 +78,7 @@ dvsku::dv_command_state dv_modal_import::render() { m_systems->model.import(m_file_path, m_materials_path); reset(); ImGui::CloseCurrentPopup(); - status = dvsku::dv_command_state::finished; + status = dvsku::gui_command_state::finished; } if (is_path_empty) @@ -90,7 +90,7 @@ dvsku::dv_command_state dv_modal_import::render() { if (ImGui::Button("Cancel", ImVec2(120, 0))) { reset(); ImGui::CloseCurrentPopup(); - status = dvsku::dv_command_state::finished; + status = dvsku::gui_command_state::finished; } ImGui::PopID(); diff --git a/source/devue_app/src/gui/modals/dv_modal_import.hpp b/source/devue_app/src/gui/modals/dv_modal_import.hpp index d9ec954..cdcf899 100644 --- a/source/devue_app/src/gui/modals/dv_modal_import.hpp +++ b/source/devue_app/src/gui/modals/dv_modal_import.hpp @@ -13,7 +13,7 @@ namespace devue { void set_materials_path(const std::string& path); public: - dvsku::dv_command_state render(); + dvsku::gui_command_state render(); private: bool m_keep_materials = false; diff --git a/source/devue_app/src/gui/modals/dv_modal_plugins.cpp b/source/devue_app/src/gui/modals/dv_modal_plugins.cpp index 8075c96..7fb6fe1 100644 --- a/source/devue_app/src/gui/modals/dv_modal_plugins.cpp +++ b/source/devue_app/src/gui/modals/dv_modal_plugins.cpp @@ -9,7 +9,7 @@ using namespace devue; dv_modal_plugins::dv_modal_plugins(dv_systems* systems, dv_components* components) : dv_comp(systems, components) {} -dvsku::dv_command_state dv_modal_plugins::render() { +dvsku::gui_command_state dv_modal_plugins::render() { bool* visible = &m_systems->command.is_set_to_execute(dv_commands::flag_show_modal_plugins); ImVec2 pos = ImGui::GetMainViewport()->GetCenter(); @@ -47,7 +47,7 @@ dvsku::dv_command_state dv_modal_plugins::render() { for (size_t i = 0; i < plugin.supported_model_types.size(); i++) { ss << plugin.supported_model_types[i].name << " "; ss << "("; - ss << dvsku::dv_util_string::replace(plugin.supported_model_types[i].extensions, ";", " "); + ss << dvsku::util_string::replace(plugin.supported_model_types[i].extensions, ";", " "); ss << ")"; if (i != plugin.supported_model_types.size() - 1) @@ -60,7 +60,7 @@ dvsku::dv_command_state dv_modal_plugins::render() { for (size_t i = 0; i < plugin.supported_texture_types.size(); i++) { ss << plugin.supported_texture_types[i].name << " "; ss << "("; - ss << dvsku::dv_util_string::replace(plugin.supported_texture_types[i].extensions, ";", " "); + ss << dvsku::util_string::replace(plugin.supported_texture_types[i].extensions, ";", " "); ss << ")"; if (i != plugin.supported_texture_types.size() - 1) @@ -155,5 +155,5 @@ dvsku::dv_command_state dv_modal_plugins::render() { ImGui::EndPopup(); } - return dvsku::dv_command_state::repeat; + return dvsku::gui_command_state::repeat; } diff --git a/source/devue_app/src/gui/modals/dv_modal_plugins.hpp b/source/devue_app/src/gui/modals/dv_modal_plugins.hpp index dd6008b..0e22c0a 100644 --- a/source/devue_app/src/gui/modals/dv_modal_plugins.hpp +++ b/source/devue_app/src/gui/modals/dv_modal_plugins.hpp @@ -9,7 +9,7 @@ namespace devue { dv_modal_plugins(dv_systems* systems, dv_components* components); public: - dvsku::dv_command_state render(); + dvsku::gui_command_state render(); private: dvsku::uuid m_current_plugin_id = 0U; diff --git a/source/devue_app/src/systems/dv_sys_command.cpp b/source/devue_app/src/systems/dv_sys_command.cpp index 466156b..4a4ecea 100644 --- a/source/devue_app/src/systems/dv_sys_command.cpp +++ b/source/devue_app/src/systems/dv_sys_command.cpp @@ -11,23 +11,23 @@ dv_sys_command::dv_sys_command(dv_systems* systems) bool dv_sys_command::prepare(dv_components* components) { if (!m_systems || !components) return false; - set_command(dv_commands::flag_show_console, dvsku::dv_command([components] { + set_command(dv_commands::flag_show_console, dvsku::gui_command([components] { return components->console.render(); })); - set_command(dv_commands::flag_show_texture, dvsku::dv_command([components] { + set_command(dv_commands::flag_show_texture, dvsku::gui_command([components] { return components->texture.render(); })); - set_command(dv_commands::flag_show_modal_import, dvsku::dv_command([components] { + set_command(dv_commands::flag_show_modal_import, dvsku::gui_command([components] { return components->modal_import.render(); })); - set_command(dv_commands::flag_show_modal_plugins, dvsku::dv_command([components] { + set_command(dv_commands::flag_show_modal_plugins, dvsku::gui_command([components] { return components->modal_plugins.render(); })); - set_command(dv_commands::flag_show_modal_about, dvsku::dv_command([components] { + set_command(dv_commands::flag_show_modal_about, dvsku::gui_command([components] { return components->modal_about.render(); })); diff --git a/source/devue_app/src/systems/dv_sys_command.hpp b/source/devue_app/src/systems/dv_sys_command.hpp index ef64528..3f4fada 100644 --- a/source/devue_app/src/systems/dv_sys_command.hpp +++ b/source/devue_app/src/systems/dv_sys_command.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include namespace devue { @@ -15,7 +15,7 @@ namespace devue { flag_show_modal_about }; - class dv_sys_command : public dvsku::dv_sys_command { + class dv_sys_command : public dvsku::gui_sys_command { public: dv_sys_command() = delete; dv_sys_command(dv_systems* systems); diff --git a/source/devue_app/src/systems/dv_sys_properties.hpp b/source/devue_app/src/systems/dv_sys_properties.hpp index bcbce99..672e50b 100644 --- a/source/devue_app/src/systems/dv_sys_properties.hpp +++ b/source/devue_app/src/systems/dv_sys_properties.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/source/devue_core/CMakeLists.txt b/source/devue_core/CMakeLists.txt index fdd7777..a34260f 100644 --- a/source/devue_core/CMakeLists.txt +++ b/source/devue_core/CMakeLists.txt @@ -25,7 +25,6 @@ TARGET_INCLUDE_DIRECTORIES(devue_core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src") TARGET_INCLUDE_DIRECTORIES(devue_core PUBLIC "${DEVUE_PLUGIN_CORE_INCLUDES}") TARGET_INCLUDE_DIRECTORIES(devue_core PUBLIC "${DEVUE_LIBRARIES_DIR}") TARGET_INCLUDE_DIRECTORIES(devue_core PUBLIC "${DEVUE_LIBRARIES_DIR}/glm/include") -TARGET_INCLUDE_DIRECTORIES(devue_core PUBLIC "${DV_GUI_INCLUDES}") -TARGET_LINK_LIBRARIES(devue_core PUBLIC dv_gui_opengl3) +TARGET_LINK_LIBRARIES(devue_core PUBLIC libgui_opengl3) TARGET_LINK_LIBRARIES(devue_core PUBLIC resources) diff --git a/source/devue_core/src/exceptions/dv_exception.hpp b/source/devue_core/src/exceptions/dv_exception.hpp index e79a5fb..545d039 100644 --- a/source/devue_core/src/exceptions/dv_exception.hpp +++ b/source/devue_core/src/exceptions/dv_exception.hpp @@ -1,11 +1,11 @@ #pragma once -#include +#include #include namespace devue::core { #define DV_THROW_EXCEPTION(fmt, ...) \ - throw devue::core::dv_exception(dvsku::dv_util_string::format(fmt, __VA_ARGS__)) + throw devue::core::dv_exception(dvsku::util_string::format(fmt, __VA_ARGS__)) class dv_exception : public std::runtime_error { public: diff --git a/source/devue_core/src/models/pdo/dv_mesh.hpp b/source/devue_core/src/models/pdo/dv_mesh.hpp index 282fbeb..bf61c2d 100644 --- a/source/devue_core/src/models/pdo/dv_mesh.hpp +++ b/source/devue_core/src/models/pdo/dv_mesh.hpp @@ -2,7 +2,7 @@ #include "glm/vec3.hpp" -#include +#include #include #include diff --git a/source/devue_core/src/models/pdo/dv_model.hpp b/source/devue_core/src/models/pdo/dv_model.hpp index f41f167..1576810 100644 --- a/source/devue_core/src/models/pdo/dv_model.hpp +++ b/source/devue_core/src/models/pdo/dv_model.hpp @@ -6,7 +6,7 @@ #include "models/pdo/dv_material.hpp" #include "models/pdo/dv_vertex.hpp" -#include +#include #include #include #include diff --git a/source/devue_core/src/scene/dv_camera.cpp b/source/devue_core/src/scene/dv_camera.cpp index 3b11bef..dd6e4d1 100644 --- a/source/devue_core/src/scene/dv_camera.cpp +++ b/source/devue_core/src/scene/dv_camera.cpp @@ -6,7 +6,7 @@ using namespace devue::core; using namespace dvsku; dv_camera::dv_camera() { - uuid = dv_util_uuid::create(); + uuid = util_uuid::create(); // Call transformations to apply initial values translate(0.0f, 0.0f); diff --git a/source/devue_core/src/scene/dv_camera.hpp b/source/devue_core/src/scene/dv_camera.hpp index 6f56a23..9d6d2a1 100644 --- a/source/devue_core/src/scene/dv_camera.hpp +++ b/source/devue_core/src/scene/dv_camera.hpp @@ -3,7 +3,7 @@ #include "glm/vec3.hpp" #include "glm/matrix.hpp" -#include +#include namespace devue::core { class dv_camera { diff --git a/source/devue_core/src/scene/dv_scene.hpp b/source/devue_core/src/scene/dv_scene.hpp index 8e919ef..72094e8 100644 --- a/source/devue_core/src/scene/dv_scene.hpp +++ b/source/devue_core/src/scene/dv_scene.hpp @@ -5,7 +5,7 @@ #include "scene/dv_camera.hpp" #include "scene/dv_scene_grid.hpp" -#include +#include #include namespace devue::core { diff --git a/source/devue_core/src/scene/dv_scene_grid.cpp b/source/devue_core/src/scene/dv_scene_grid.cpp index 355e854..eeaa621 100644 --- a/source/devue_core/src/scene/dv_scene_grid.cpp +++ b/source/devue_core/src/scene/dv_scene_grid.cpp @@ -19,5 +19,5 @@ dv_scene_grid::dv_scene_grid() { mesh.faces.push_back({ 0, 1, 2 }); mesh.faces.push_back({ 2, 3, 0 }); - model.meshes[dvsku::dv_util_uuid::create("grid")] = mesh; + model.meshes[dvsku::util_uuid::create("grid")] = mesh; } diff --git a/source/devue_core/src/scene/lighting/dv_light.hpp b/source/devue_core/src/scene/lighting/dv_light.hpp index a128340..f919e66 100644 --- a/source/devue_core/src/scene/lighting/dv_light.hpp +++ b/source/devue_core/src/scene/lighting/dv_light.hpp @@ -2,7 +2,7 @@ #include "glm/glm.hpp" -#include +#include namespace devue::core { struct dv_light { @@ -14,7 +14,7 @@ namespace devue::core { bool is_enabled = true; dv_light() { - uuid = dvsku::dv_util_uuid::create(); + uuid = dvsku::util_uuid::create(); } virtual glm::vec3 get_light_color() { diff --git a/source/devue_core/src/scene/model/dv_scene_material.hpp b/source/devue_core/src/scene/model/dv_scene_material.hpp index 2758e40..b0e2363 100644 --- a/source/devue_core/src/scene/model/dv_scene_material.hpp +++ b/source/devue_core/src/scene/model/dv_scene_material.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace devue::core { struct dv_scene_material { diff --git a/source/devue_core/src/scene/model/dv_scene_mesh.hpp b/source/devue_core/src/scene/model/dv_scene_mesh.hpp index cac6d91..b9110c0 100644 --- a/source/devue_core/src/scene/model/dv_scene_mesh.hpp +++ b/source/devue_core/src/scene/model/dv_scene_mesh.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/source/devue_core/src/scene/model/dv_scene_model.hpp b/source/devue_core/src/scene/model/dv_scene_model.hpp index 93ec396..e5320d3 100644 --- a/source/devue_core/src/scene/model/dv_scene_model.hpp +++ b/source/devue_core/src/scene/model/dv_scene_model.hpp @@ -3,7 +3,7 @@ #include "scene/model/dv_scene_mesh.hpp" #include "scene/model/dv_transform.hpp" -#include +#include #include #include diff --git a/source/devue_core/src/systems/dv_sys_material.hpp b/source/devue_core/src/systems/dv_sys_material.hpp index 788e00a..1d919da 100644 --- a/source/devue_core/src/systems/dv_sys_material.hpp +++ b/source/devue_core/src/systems/dv_sys_material.hpp @@ -4,7 +4,7 @@ #include "scene/model/dv_scene_model.hpp" #include "scene/model/dv_scene_material.hpp" -#include +#include #include namespace devue::core { diff --git a/source/devue_core/src/systems/dv_sys_model.cpp b/source/devue_core/src/systems/dv_sys_model.cpp index 17ab32b..fe75b76 100644 --- a/source/devue_core/src/systems/dv_sys_model.cpp +++ b/source/devue_core/src/systems/dv_sys_model.cpp @@ -26,13 +26,13 @@ bool dv_sys_model::import(const std::string& path, const std::string& material_p std::string ext = filepath.extension().string(); // Create uuid from path - dvsku::uuid uuid = dvsku::dv_util_uuid::create(path); + dvsku::uuid uuid = dvsku::util_uuid::create(path); if (models.contains(uuid)) return true; auto cmp_fn = [&](const dv_file_type& type) { - return dv_util_string::contains(type.extensions, ext); + return util_string::contains(type.extensions, ext); }; // Flag to check if we tried importing but all importers failed @@ -83,7 +83,7 @@ bool dv_sys_model::import(const std::string& path, const std::string& material_p for (size_t i = 0; i < pmodel.materials.size(); i++) { auto& pmaterial = pmodel.materials[i]; - dvsku::uuid uuid = dvsku::dv_util_uuid::create(DV_FORMAT("mat_{}_{}", model.name, i)); + dvsku::uuid uuid = dvsku::util_uuid::create(DV_FORMAT("mat_{}_{}", model.name, i)); model.materials[uuid] = dv_material(); dv_material& material = model.materials[uuid]; @@ -92,8 +92,8 @@ bool dv_sys_model::import(const std::string& path, const std::string& material_p } for (auto& pmesh : pmodel.meshes) { - dvsku::uuid mesh_uuid = dvsku::dv_util_uuid::create(DV_FORMAT("{}_{}", path, pmesh.name)); - dvsku::uuid material_uuid = dvsku::dv_util_uuid::create(DV_FORMAT("mat_{}_{}", model.name, pmesh.material_index)); + dvsku::uuid mesh_uuid = dvsku::util_uuid::create(DV_FORMAT("{}_{}", path, pmesh.name)); + dvsku::uuid material_uuid = dvsku::util_uuid::create(DV_FORMAT("mat_{}_{}", model.name, pmesh.material_index)); model.meshes[mesh_uuid] = dv_mesh(); diff --git a/source/devue_core/src/systems/dv_sys_model.hpp b/source/devue_core/src/systems/dv_sys_model.hpp index cf91c63..781be6e 100644 --- a/source/devue_core/src/systems/dv_sys_model.hpp +++ b/source/devue_core/src/systems/dv_sys_model.hpp @@ -2,7 +2,7 @@ #include "models/pdo/dv_model.hpp" -#include +#include #include namespace devue::core { diff --git a/source/devue_core/src/systems/dv_sys_plugin.cpp b/source/devue_core/src/systems/dv_sys_plugin.cpp index b3516f2..d9d2d1f 100644 --- a/source/devue_core/src/systems/dv_sys_plugin.cpp +++ b/source/devue_core/src/systems/dv_sys_plugin.cpp @@ -101,7 +101,7 @@ bool dv_sys_plugin::is_supported_model_type(const std::string& path) { std::string ext = filepath.extension().string(); auto cmp_fn = [&](const dv_file_type& type) { - return dvsku::dv_util_string::contains(type.extensions, ext); + return dvsku::util_string::contains(type.extensions, ext); }; for (auto& [plugin_uuid, plugin] : plugins) { @@ -135,7 +135,7 @@ void dv_sys_plugin::prepare_plugins() { if (!filepath.filename().string().starts_with("dv_plg_")) continue; - dvsku::uuid uuid = dvsku::dv_util_uuid::create(filepath.string()); + dvsku::uuid uuid = dvsku::util_uuid::create(filepath.string()); if (plugins.contains(uuid)) continue; diff --git a/source/devue_core/src/systems/dv_sys_plugin.hpp b/source/devue_core/src/systems/dv_sys_plugin.hpp index f25ede1..1a7f242 100644 --- a/source/devue_core/src/systems/dv_sys_plugin.hpp +++ b/source/devue_core/src/systems/dv_sys_plugin.hpp @@ -2,7 +2,7 @@ #include "plugins/dv_plugin.hpp" -#include +#include #include #include diff --git a/source/devue_core/src/systems/dv_sys_rendering.cpp b/source/devue_core/src/systems/dv_sys_rendering.cpp index 8f2d623..2c42e1e 100644 --- a/source/devue_core/src/systems/dv_sys_rendering.cpp +++ b/source/devue_core/src/systems/dv_sys_rendering.cpp @@ -115,7 +115,7 @@ void dv_sys_rendering::render(dv_scene_model& smodel, dv_camera& camera, dv_ligh if (!smodel.vao || !smodel.vbo) return; if (!m_systems->model.models.contains(smodel.model_uuid)) return; - static const dvsku::uuid SHADER_ID = dvsku::dv_util_uuid::create("integrated_default"); + static const dvsku::uuid SHADER_ID = dvsku::util_uuid::create("integrated_default"); dv_shader* shader = set_shader(SHADER_ID); if (!shader) return; @@ -208,7 +208,7 @@ void dv_sys_rendering::render(dv_scene_model& smodel, dv_camera& camera, dv_ligh void dv_sys_rendering::render(dv_scene_grid& sgrid, dv_camera& camera, dv_lighting& lighting) { if (!sgrid.vao || !sgrid.vbo) return; - static const dvsku::uuid SHADER_ID = dvsku::dv_util_uuid::create("integrated_grid"); + static const dvsku::uuid SHADER_ID = dvsku::util_uuid::create("integrated_grid"); // Set grid shader dv_shader* shader = set_shader(SHADER_ID); diff --git a/source/devue_core/src/systems/dv_sys_rendering.hpp b/source/devue_core/src/systems/dv_sys_rendering.hpp index f664a92..337f3b1 100644 --- a/source/devue_core/src/systems/dv_sys_rendering.hpp +++ b/source/devue_core/src/systems/dv_sys_rendering.hpp @@ -8,7 +8,7 @@ #include "scene/model/dv_scene_material.hpp" #include "scene/model/dv_scene_model.hpp" -#include +#include #include namespace devue::core { diff --git a/source/devue_core/src/systems/dv_sys_scene.cpp b/source/devue_core/src/systems/dv_sys_scene.cpp index 980cfd1..bcc3e65 100644 --- a/source/devue_core/src/systems/dv_sys_scene.cpp +++ b/source/devue_core/src/systems/dv_sys_scene.cpp @@ -37,7 +37,7 @@ size_t dv_sys_scene::count() const { dv_scene* dv_sys_scene::create_scene() { try { - dvsku::uuid uuid = dvsku::dv_util_uuid::create(); + dvsku::uuid uuid = dvsku::util_uuid::create(); m_scenes[uuid] = dv_scene(); current_scene = &m_scenes[uuid]; @@ -85,7 +85,7 @@ void dv_sys_scene::add_to_scene(dv_model& model) { if (!current_scene) return; try { - dvsku::uuid uuid = dvsku::dv_util_uuid::create(); + dvsku::uuid uuid = dvsku::util_uuid::create(); current_scene->models[uuid] = dv_scene_model(); dv_scene_model& smodel = current_scene->models[uuid]; diff --git a/source/devue_core/src/systems/dv_sys_shader.cpp b/source/devue_core/src/systems/dv_sys_shader.cpp index 1ddd7bd..1e118fa 100644 --- a/source/devue_core/src/systems/dv_sys_shader.cpp +++ b/source/devue_core/src/systems/dv_sys_shader.cpp @@ -43,7 +43,7 @@ bool dv_sys_shader::compile_integrated_shaders() { std::string source_vert = std::string(file_vert.cbegin(), file_vert.cend()); std::string source_frag = std::string(file_frag.cbegin(), file_frag.cend()); - auto uuid = dvsku::dv_util_uuid::create("integrated_default"); + auto uuid = dvsku::util_uuid::create("integrated_default"); shaders[uuid] = compile_shader(source_vert, source_frag); } @@ -58,7 +58,7 @@ bool dv_sys_shader::compile_integrated_shaders() { std::string source_vert = std::string(file_vert.cbegin(), file_vert.cend()); std::string source_frag = std::string(file_frag.cbegin(), file_frag.cend()); - auto uuid = dvsku::dv_util_uuid::create("integrated_grid"); + auto uuid = dvsku::util_uuid::create("integrated_grid"); shaders[uuid] = compile_shader(source_vert, source_frag); } diff --git a/source/devue_core/src/systems/dv_sys_shader.hpp b/source/devue_core/src/systems/dv_sys_shader.hpp index aad27ac..f9285e2 100644 --- a/source/devue_core/src/systems/dv_sys_shader.hpp +++ b/source/devue_core/src/systems/dv_sys_shader.hpp @@ -2,7 +2,7 @@ #include "rendering/dv_shader.hpp" -#include +#include #include namespace devue::core { diff --git a/source/devue_core/src/systems/dv_sys_texture.cpp b/source/devue_core/src/systems/dv_sys_texture.cpp index 7e525ec..12697db 100644 --- a/source/devue_core/src/systems/dv_sys_texture.cpp +++ b/source/devue_core/src/systems/dv_sys_texture.cpp @@ -38,7 +38,7 @@ void dv_sys_texture::prepare_material_textures(dv_model& model, { if (!material.diffuse_texture.empty()) { std::filesystem::path texture = std::filesystem::path(model.texture_dir).append(material.diffuse_texture); - dvsku::uuid uuid = dvsku::dv_util_uuid::create(texture.string()); + dvsku::uuid uuid = dvsku::util_uuid::create(texture.string()); try { if (textures.contains(uuid)) { @@ -123,7 +123,7 @@ dv_scene_texture dv_sys_texture::create_scene_texture(std::filesystem::path& fil std::string ext = filepath.extension().string(); auto cmp_fn = [&](const dv_file_type& type) { - return dvsku::dv_util_string::contains(type.extensions, ext); + return dvsku::util_string::contains(type.extensions, ext); }; // Flag to check if we tried importing but all importers failed diff --git a/source/devue_core/src/systems/dv_sys_texture.hpp b/source/devue_core/src/systems/dv_sys_texture.hpp index 74861ae..8c95627 100644 --- a/source/devue_core/src/systems/dv_sys_texture.hpp +++ b/source/devue_core/src/systems/dv_sys_texture.hpp @@ -5,7 +5,7 @@ #include "scene/model/dv_scene_texture.hpp" #include "devue_plugin_texture.hpp" -#include +#include #include #include