Rename OpenGL event to GraphicsBackend (#4515)

This commit is contained in:
Akash Mohan Chaudhary
2026-09-07 02:32:21 +05:30
committed by GitHub
parent a33d3f00fb
commit 042f21da5c
12 changed files with 43 additions and 42 deletions

View File

@@ -34,7 +34,7 @@ public:
}
if (!eglBindAPI(EGL_OPENGL_ES_API)) {
mln::Log::Error(mln::Event::OpenGL,
mln::Log::Error(mln::Event::GraphicsBackend,
"eglBindAPI(EGL_OPENGL_ES_API) returned error " + std::to_string(eglGetError()));
throw std::runtime_error("eglBindAPI() failed");
}
@@ -75,7 +75,7 @@ public:
if (eglContext == EGL_NO_CONTEXT) {
std::ostringstream logMsg;
logMsg << "eglCreateContext() returned error 0x" << std::hex << eglGetError();
mln::Log::Error(mln::Event::OpenGL, logMsg.str());
mln::Log::Error(mln::Event::GraphicsBackend, logMsg.str());
throw std::runtime_error("Error creating the EGL context object.\n");
}
@@ -95,12 +95,12 @@ public:
~EGLBackendImpl() final {
if (eglSurface != EGL_NO_SURFACE) {
if (!eglDestroySurface(eglDisplay->display, eglSurface)) {
Log::Error(Event::OpenGL, "Failed to destroy EGL surface.");
Log::Error(Event::GraphicsBackend, "Failed to destroy EGL surface.");
}
eglSurface = EGL_NO_SURFACE;
}
if (!eglDestroyContext(eglDisplay->display, eglContext)) {
Log::Error(Event::OpenGL, "Failed to destroy EGL context.");
Log::Error(Event::GraphicsBackend, "Failed to destroy EGL context.");
}
}

View File

@@ -97,7 +97,7 @@ public:
// Try to create a legacy context.
glContext = glXCreateNewContext(glxDisplay->xDisplay, glxDisplay->fbConfigs[0], GLX_RGBA_TYPE, None, True);
if (glContext && !glXIsDirect(glxDisplay->xDisplay, glContext)) {
Log::Error(Event::OpenGL, "failed to create direct OpenGL Legacy context");
Log::Error(Event::GraphicsBackend, "failed to create direct OpenGL Legacy context");
glXDestroyContext(glxDisplay->xDisplay, glContext);
glContext = nullptr;
}