update some libs and fix opengl info

This commit is contained in:
2025-09-21 22:54:11 +03:00
parent 27c2e00faa
commit adbffacd40
8 changed files with 44 additions and 40 deletions

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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());
}
});
}

View File

@@ -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;
}
}

View File

@@ -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<const char*>(glGetString(n))