[Bf-blender-cvs] [d486f33d636] master: GHOST: OpenGL errors now use "file:line: " contention for errors

Campbell Barton noreply at git.blender.org
Tue Dec 6 04:53:41 CET 2022


Commit: d486f33d6365956e0e33302d39360d53c6f99904
Author: Campbell Barton
Date:   Tue Dec 6 14:48:38 2022 +1100
Branches: master
https://developer.blender.org/rBd486f33d6365956e0e33302d39360d53c6f99904

GHOST: OpenGL errors now use "file:line: " contention for errors

Make OpenGL errors match formatting used by GCC & clang
(as well as Blender's logging), so utilities that recognize this
convention can be used to quickly access this location.

===================================================================

M	intern/ghost/intern/GHOST_Context.cpp
M	intern/ghost/intern/GHOST_ContextEGL.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_Context.cpp b/intern/ghost/intern/GHOST_Context.cpp
index 17ee39d952c..dc040cc2c76 100644
--- a/intern/ghost/intern/GHOST_Context.cpp
+++ b/intern/ghost/intern/GHOST_Context.cpp
@@ -101,7 +101,7 @@ bool win32_chk(bool result, const char *file, int line, const char *text)
 
 #  ifndef NDEBUG
     _ftprintf(
-        stderr, "%s(%d):[%s] -> Win32 Error# (%lu): %s", file, line, text, ulong(error), msg);
+        stderr, "%s:%d: [%s] -> Win32 Error# (%lu): %s", file, line, text, ulong(error), msg);
 #  else
     _ftprintf(stderr, "Win32 Error# (%lu): %s", ulong(error), msg);
 #  endif
diff --git a/intern/ghost/intern/GHOST_ContextEGL.cpp b/intern/ghost/intern/GHOST_ContextEGL.cpp
index fb1865630e3..ab518ebb174 100644
--- a/intern/ghost/intern/GHOST_ContextEGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextEGL.cpp
@@ -123,7 +123,7 @@ static bool egl_chk(bool result,
 
 #ifndef NDEBUG
     fprintf(stderr,
-            "%s(%d):[%s] -> EGL Error (0x%04X): %s: %s\n",
+            "%s:%d: [%s] -> EGL Error (0x%04X): %s: %s\n",
             file,
             line,
             text,



More information about the Bf-blender-cvs mailing list