Make another adjustment to glXQueryExtensions
Use GDK/GTK to get the X display instead of glXGetCurrentDisplay(). For #985. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
643ec0f7b6
commit
236cffb42b
|
@ -3,12 +3,14 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#if defined(__WXGTK__) && defined(HAVE_XSS)
|
#ifdef __WXGTK__
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#define Status int
|
#define Status int
|
||||||
#include <X11/extensions/scrnsaver.h>
|
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#ifdef HAVE_XSS
|
||||||
|
#include <X11/extensions/scrnsaver.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/dcbuffer.h>
|
#include <wx/dcbuffer.h>
|
||||||
|
@ -2170,7 +2172,7 @@ void GLDrawingPanel::DrawingPanelInit()
|
||||||
static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL;
|
static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL;
|
||||||
static PFNGLXSWAPINTERVALMESAPROC glXSwapIntervalMESA = NULL;
|
static PFNGLXSWAPINTERVALMESAPROC glXSwapIntervalMESA = NULL;
|
||||||
|
|
||||||
auto display = glXGetCurrentDisplay();
|
auto display = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(wxGetApp().frame->GetHandle()));
|
||||||
|
|
||||||
char* glxQuery = (char*)glXQueryExtensionsString(display, DefaultScreen(display));
|
char* glxQuery = (char*)glXQueryExtensionsString(display, DefaultScreen(display));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue