From adbffacd40910b2bdf2e435f00a1a1b43b7c06a4 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Sun, 21 Sep 2025 22:54:11 +0300 Subject: [PATCH] update some libs and fix opengl info --- src/vertex_engine/event/event.hpp | 2 +- src/vertex_engine/glfw/context/context.cpp | 14 ++++++++------ src/vertex_engine/glfw/glfw.cpp | 18 +++++++++--------- .../opengl/shader_program/shader_program.cpp | 4 ++-- src/vertex_engine/utils/define.hpp | 1 + subprojects/glfw.wrap | 18 +++++++++--------- subprojects/glm.wrap | 17 +++++++++-------- subprojects/imgui.wrap | 10 +++++----- 8 files changed, 44 insertions(+), 40 deletions(-) mode change 100755 => 100644 subprojects/glfw.wrap mode change 100755 => 100644 subprojects/glm.wrap diff --git a/src/vertex_engine/event/event.hpp b/src/vertex_engine/event/event.hpp index 352e0c9..a4ba6be 100755 --- a/src/vertex_engine/event/event.hpp +++ b/src/vertex_engine/event/event.hpp @@ -30,7 +30,7 @@ namespace VE hack::exception ex; ex.service(e.what()); ex.description("dont convert type any_cast"); - ex.log(); + hack::error()(ex); throw ex; } diff --git a/src/vertex_engine/glfw/context/context.cpp b/src/vertex_engine/glfw/context/context.cpp index ed4b56d..806930f 100755 --- a/src/vertex_engine/glfw/context/context.cpp +++ b/src/vertex_engine/glfw/context/context.cpp @@ -1,5 +1,7 @@ #include "context.hpp" +#include "vertex_engine/utils/define.hpp" // IWYU pragma: keep + namespace VE { context::context(GLFWwindow* w) : m_win { w } @@ -7,12 +9,12 @@ namespace VE glfwMakeContextCurrent(m_win); int status = gladLoadGLLoader((GLADloadproc)glfwGetProcAddress); - hack::log(": ")("Glad loader status", status == 1 ? "Load" : "UNLOAD"); - hack::log(": ")("OpenGL Info"); - hack::log(": ")(" Vendor", glGetString(GL_VENDOR)); - hack::log(": ")(" Renderer", glGetString(GL_RENDERER)); - hack::log(": ")(" Version", glGetString(GL_VERSION)); - hack::log(": ")(" GLSL Version", glGetString(GL_SHADING_LANGUAGE_VERSION)); + hack::log()("Glad loader status:", status == 1 ? "Load" : "UNLOAD"); + hack::log()("OpenGL Info:"); + hack::log()(" Vendor:", VE_GLGETSTRING(GL_VENDOR)); + hack::log()(" Renderer:", VE_GLGETSTRING(GL_RENDERER)); + hack::log()(" Version:", VE_GLGETSTRING(GL_VERSION)); + hack::log()(" GLSL Version:", VE_GLGETSTRING(GL_SHADING_LANGUAGE_VERSION)); glfwSwapInterval(1); diff --git a/src/vertex_engine/glfw/glfw.cpp b/src/vertex_engine/glfw/glfw.cpp index ac82bdc..2df3a9f 100755 --- a/src/vertex_engine/glfw/glfw.cpp +++ b/src/vertex_engine/glfw/glfw.cpp @@ -16,7 +16,7 @@ namespace VE glfw::~glfw() { - hack::warn(": ")("Destroy glfw window", m_win_data.m_name); + hack::warn()("Destroy glfw window:", m_win_data.m_name); glfwDestroyWindow(m_win); glfwTerminate(); } @@ -67,9 +67,9 @@ namespace VE glfwGetWindowSize(m_win, &m_win_data.m_width, &m_win_data.m_height); - hack::log(": ")("Created glfw window", m_win_data.m_name); - hack::log(" = ")(" width", m_win_data.m_width); - hack::log(" = ")(" height", m_win_data.m_height); + hack::log()("Created glfw window:", m_win_data.m_name); + hack::log()(" width =", m_win_data.m_width); + hack::log()(" height =", m_win_data.m_height); } void glfw::set_graphic_context() @@ -190,7 +190,7 @@ namespace VE } catch(std::exception& e) { - hack::log()("VE_ERROR: ", e.what()); + hack::log()("VE_ERROR:", e.what()); } }); @@ -204,7 +204,7 @@ namespace VE } catch(std::exception& e) { - hack::log()("VE_ERROR: ", e.what()); + hack::log()("VE_ERROR:", e.what()); } }); } @@ -227,7 +227,7 @@ namespace VE } catch(std::exception& e) { - hack::log()("VE_ERROR: ", e.what()); + hack::log()("VE_ERROR:", e.what()); } }); @@ -240,7 +240,7 @@ namespace VE } catch(std::exception& e) { - hack::log()("VE_ERROR: ", e.what()); + hack::log()("VE_ERROR:", e.what()); } }); @@ -253,7 +253,7 @@ namespace VE } catch(std::exception& e) { - hack::log()("VE_ERROR: ", e.what()); + hack::log()("VE_ERROR:", e.what()); } }); } diff --git a/src/vertex_engine/opengl/shader_program/shader_program.cpp b/src/vertex_engine/opengl/shader_program/shader_program.cpp index 4cc3334..9bba756 100644 --- a/src/vertex_engine/opengl/shader_program/shader_program.cpp +++ b/src/vertex_engine/opengl/shader_program/shader_program.cpp @@ -112,10 +112,10 @@ namespace VE if (compale == GL_FALSE) { glGetShaderInfoLog(shader, 1024, NULL, info); - hack::error("")("shader compale error: ", type_to_name(type), info); + hack::error()("shader compale error:", type_to_name(type), info); return true; } - hack::log("")("shader compale is good: ", type_to_name(type)); + hack::log()("shader compale is good:", type_to_name(type)); return false; } } diff --git a/src/vertex_engine/utils/define.hpp b/src/vertex_engine/utils/define.hpp index 1cc286f..d6c0bfc 100755 --- a/src/vertex_engine/utils/define.hpp +++ b/src/vertex_engine/utils/define.hpp @@ -21,3 +21,4 @@ #define VE_NAME(n) VE::func::name(n).data() #define VE_COLOR(c, t) VE::func::color(c, t) +#define VE_GLGETSTRING(n) reinterpret_cast(glGetString(n)) diff --git a/subprojects/glfw.wrap b/subprojects/glfw.wrap old mode 100755 new mode 100644 index 6c3fa9d..a408912 --- a/subprojects/glfw.wrap +++ b/subprojects/glfw.wrap @@ -1,13 +1,13 @@ [wrap-file] -directory = glfw-3.3.7 -source_url = https://github.com/glfw/glfw/archive/refs/tags/3.3.7.tar.gz -source_filename = glfw-3.3.7.tar.gz -source_hash = fd21a5f65bcc0fc3c76e0f8865776e852de09ef6fbc3620e09ce96d2b2807e04 -patch_filename = glfw_3.3.7-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/glfw_3.3.7-1/get_patch -patch_hash = cfc19fedadd1492f1bcf4a7e7604c81398571a696f94f3d18992060caf6b7057 -wrapdb_version = 3.3.7-1 +directory = glfw-3.4 +source_url = https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz +source_filename = glfw-3.4.tar.gz +source_hash = c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01 +patch_filename = glfw_3.4-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/glfw_3.4-1/get_patch +patch_hash = 58a6a6cdb28195d7f7e6f5de85dff7044d378e49b46bf1d4a9b04c97ed93e6b0 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/glfw_3.4-1/glfw-3.4.tar.gz +wrapdb_version = 3.4-1 [provide] glfw3 = glfw_dep - diff --git a/subprojects/glm.wrap b/subprojects/glm.wrap old mode 100755 new mode 100644 index 3076857..d75571e --- a/subprojects/glm.wrap +++ b/subprojects/glm.wrap @@ -1,12 +1,13 @@ [wrap-file] -directory = glm-0.9.9.8 -source_url = https://github.com/g-truc/glm/archive/0.9.9.8.tar.gz -source_filename = 0.9.9.8.tar.gz -source_hash = 7d508ab72cb5d43227a3711420f06ff99b0a0cb63ee2f93631b162bfe1fe9592 -patch_url = https://wrapdb.mesonbuild.com/v2/glm_0.9.9.8-2/get_patch -patch_filename = glm-0.9.9.8-2-wrap.zip -patch_hash = d930a1fcd3a28d84be4e92cc4c71ff59e170a1ebbd3dbfce631eba19e478d83d +directory = glm-1.0.1 +source_url = https://github.com/g-truc/glm/archive/refs/tags/1.0.1.tar.gz +source_filename = glm-1.0.1.tar.gz +source_hash = 9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c +patch_filename = glm_1.0.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/glm_1.0.1-1/get_patch +patch_hash = 25679275e26bc4c36bb617d1b4a52197039402af828d2a4bf67b3c0260a5df6a +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/glm_1.0.1-1/glm-1.0.1.tar.gz +wrapdb_version = 1.0.1-1 [provide] glm = glm_dep - diff --git a/subprojects/imgui.wrap b/subprojects/imgui.wrap index 04720e6..9815666 100644 --- a/subprojects/imgui.wrap +++ b/subprojects/imgui.wrap @@ -3,11 +3,11 @@ directory = imgui-1.91.6 source_url = https://github.com/ocornut/imgui/archive/refs/tags/v1.91.6.tar.gz source_filename = imgui-1.91.6.tar.gz source_hash = c5fbc5dcab1d46064001c3b84d7a88812985cde7e0e9ced03f5677bec1ba502a -patch_filename = imgui_1.91.6-2_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/imgui_1.91.6-2/get_patch -patch_hash = 515e31b18e3928aafce2c62c94fa6d8426f5132e9c3f2d9951b7e96b6381f33a -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/imgui_1.91.6-2/imgui-1.91.6.tar.gz -wrapdb_version = 1.91.6-2 +patch_filename = imgui_1.91.6-3_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/imgui_1.91.6-3/get_patch +patch_hash = 2f7977114ba07d06559aaf8890a92a4ebd25186592d4447954605aaf2244634d +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/imgui_1.91.6-3/imgui-1.91.6.tar.gz +wrapdb_version = 1.91.6-3 [provide] imgui = imgui_dep