@@ -317,6 +317,14 @@ void GLResolver::ResolveProviderFunctions()
317317 if (sym != nullptr )
318318 {
319319 m_eglGetProcAddress = SymbolToFunction<EglGetProcAddressFn>(sym);
320+ if (m_eglGetProcAddress == nullptr )
321+ {
322+ LOG_DEBUG (" [GLResolver] eglGetProcAddress found but could not be converted to a function pointer" );
323+ }
324+ }
325+ else
326+ {
327+ LOG_DEBUG (" [GLResolver] eglGetProcAddress not found (EGL loaded but missing symbol)" );
320328 }
321329 }
322330
@@ -332,6 +340,14 @@ void GLResolver::ResolveProviderFunctions()
332340 if (sym != nullptr )
333341 {
334342 m_wglGetProcAddress = SymbolToFunction<WglGetProcAddressFn>(sym);
343+ if (m_wglGetProcAddress == nullptr )
344+ {
345+ LOG_DEBUG (" [GLResolver] wglGetProcAddress found but could not be converted to a function pointer" );
346+ }
347+ }
348+ else
349+ {
350+ LOG_DEBUG (" [GLResolver] wglGetProcAddress not found (GL library loaded but missing symbol)" );
335351 }
336352 }
337353#else
@@ -357,6 +373,14 @@ void GLResolver::ResolveProviderFunctions()
357373 if (sym != nullptr )
358374 {
359375 m_glxGetProcAddress = SymbolToFunction<GlxGetProcAddressFn>(sym);
376+ if (m_glxGetProcAddress == nullptr )
377+ {
378+ LOG_DEBUG (" [GLResolver] glXGetProcAddress* found but could not be converted to a function pointer" );
379+ }
380+ }
381+ else
382+ {
383+ LOG_DEBUG (" [GLResolver] glXGetProcAddress* not found (GLX loaded but missing symbol)" );
360384 }
361385 }
362386#endif
@@ -454,7 +478,10 @@ auto GLResolver::LoadGlad() -> bool
454478 LOG_DEBUG (" [GLResolver] gladLoadGL() succeeded" );
455479 return true ;
456480 }
457- LOG_FATAL (" [GLResolver] gladLoadGL() failed" );
481+ LOG_FATAL (std::string (" [GLResolver] gladLoadGL() failed (backend=" ) +
482+ BackendToString (m_backend) +
483+ " , egl='" + m_eglLib.LoadedName () + " ', gl='" + m_glLib.LoadedName () +
484+ " ', glx='" + m_glxLib.LoadedName () + " ')" );
458485 return false ;
459486#else
460487 const int result = gladLoadGLES2 (&gladBridgeResolverThunk);
@@ -463,7 +490,10 @@ auto GLResolver::LoadGlad() -> bool
463490 LOG_DEBUG (" [GLResolver] gladLoadGLES2() succeeded" );
464491 return true ;
465492 }
466- LOG_FATAL (" [GLResolver] gladLoadGLES2() failed" );
493+ LOG_FATAL (std::string (" [GLResolver] gladLoadGLES2() failed (backend=" ) +
494+ BackendToString (m_backend) +
495+ " , egl='" + m_eglLib.LoadedName () + " ', gl='" + m_glLib.LoadedName () +
496+ " ', glx='" + m_glxLib.LoadedName () + " ')" );
467497 return false ;
468498#endif
469499}
0 commit comments