diff options
Diffstat (limited to 'platform/linuxbsd/context_gl_x11.cpp')
-rw-r--r-- | platform/linuxbsd/context_gl_x11.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/platform/linuxbsd/context_gl_x11.cpp b/platform/linuxbsd/context_gl_x11.cpp index 308d68521a..71dc9602b3 100644 --- a/platform/linuxbsd/context_gl_x11.cpp +++ b/platform/linuxbsd/context_gl_x11.cpp @@ -46,22 +46,18 @@ typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *); struct ContextGL_X11_Private { - ::GLXContext glx_context; }; void ContextGL_X11::release_current() { - glXMakeCurrent(x11_display, None, nullptr); } void ContextGL_X11::make_current() { - glXMakeCurrent(x11_display, x11_window, p->glx_context); } void ContextGL_X11::swap_buffers() { - glXSwapBuffers(x11_display, x11_window); } @@ -85,7 +81,6 @@ static void set_class_hint(Display *p_display, Window p_window) { } Error ContextGL_X11::initialize() { - //const char *extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display)); GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte *)"glXCreateContextAttribsARB"); @@ -167,7 +162,6 @@ Error ContextGL_X11::initialize() { switch (context_type) { case GLES_2_0_COMPATIBLE: { - p->glx_context = glXCreateNewContext(x11_display, fbconfig, GLX_RGBA_TYPE, 0, true); ERR_FAIL_COND_V(!p->glx_context, ERR_UNCONFIGURED); } break; @@ -192,7 +186,6 @@ Error ContextGL_X11::initialize() { } int ContextGL_X11::get_window_width() { - XWindowAttributes xwa; XGetWindowAttributes(x11_display, x11_window, &xwa); @@ -234,14 +227,13 @@ void ContextGL_X11::set_use_vsync(bool p_use) { return; use_vsync = p_use; } -bool ContextGL_X11::is_using_vsync() const { +bool ContextGL_X11::is_using_vsync() const { return use_vsync; } ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, ContextType p_context_type) : x11_window(p_x11_window) { - default_video_mode = p_default_video_mode; x11_display = p_x11_display; |