forked from AuroraMiddleware/gtk
inspector/general.c: Check whether GL context supports WGL
We may well be using an EGL context that does not support Desktop (W)GL on Windows, such as in the case of using libANGLE. So, check whether WGL is supported for this running instance before trying to query WGL extensions. This will get rid of warning messages from libepoxy.
This commit is contained in:
parent
04c9c6b428
commit
89d87e3482
@ -45,12 +45,12 @@
|
|||||||
|
|
||||||
#ifdef GDK_WINDOWING_WIN32
|
#ifdef GDK_WINDOWING_WIN32
|
||||||
#include "win32/gdkwin32.h"
|
#include "win32/gdkwin32.h"
|
||||||
|
#include "gdkglcontextprivate.h"
|
||||||
#include <epoxy/wgl.h>
|
#include <epoxy/wgl.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef GDK_WIN32_ENABLE_EGL
|
||||||
#include <epoxy/egl.h>
|
#include <epoxy/egl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_MACOS
|
#ifdef GDK_WINDOWING_MACOS
|
||||||
#include "macos/gdkmacos.h"
|
#include "macos/gdkmacos.h"
|
||||||
@ -387,7 +387,8 @@ init_gl (GtkInspectorGeneral *gen)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#ifdef GDK_WINDOWING_WIN32
|
#ifdef GDK_WINDOWING_WIN32
|
||||||
if (GDK_IS_WIN32_DISPLAY (gen->display))
|
if (GDK_IS_WIN32_DISPLAY (gen->display) &&
|
||||||
|
gdk_gl_backend_can_be_used (GDK_GL_WGL, NULL))
|
||||||
{
|
{
|
||||||
int gl_version;
|
int gl_version;
|
||||||
char *version;
|
char *version;
|
||||||
|
Loading…
Reference in New Issue
Block a user