diff options
Diffstat (limited to 'platform/x11/context_gl_x11.cpp')
-rw-r--r-- | platform/x11/context_gl_x11.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp index 89bd5f58ff..9f987e1376 100644 --- a/platform/x11/context_gl_x11.cpp +++ b/platform/x11/context_gl_x11.cpp @@ -41,7 +41,7 @@ typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display*, GLXFBConfig, GLXContext, Bool, const int*); -struct ContextGL_X11_Private { +struct ContextGL_X11_Private { ::GLXContext glx_context; }; @@ -76,13 +76,13 @@ static GLWrapperFuncPtr wrapper_get_proc_address(const char* p_function) { Error ContextGL_X11::initialize() { - + GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = NULL; - + // const char *extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display)); - + glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); - + ERR_FAIL_COND_V( !glXCreateContextAttribsARB, ERR_UNCONFIGURED ); @@ -94,13 +94,13 @@ Error ContextGL_X11::initialize() { GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DEPTH_SIZE, 24, - None + None }; int fbcount; GLXFBConfig *fbc = glXChooseFBConfig(x11_display, DefaultScreen(x11_display), visual_attribs, &fbcount); ERR_FAIL_COND_V(!fbc,ERR_UNCONFIGURED); - + XVisualInfo *vi = glXGetVisualFromFBConfig(x11_display, fbc[0]); XSetWindowAttributes swa; @@ -140,7 +140,7 @@ Error ContextGL_X11::initialize() { GLX_CONTEXT_MINOR_VERSION_ARB, 0, None }; - + p->glx_context = glXCreateContextAttribsARB(x11_display, fbc[0], NULL, true, context_attribs); ERR_FAIL_COND_V(!p->glx_context,ERR_UNCONFIGURED); } @@ -150,7 +150,7 @@ Error ContextGL_X11::initialize() { /* glWrapperInit(wrapper_get_proc_address); glFlush(); - + glXSwapBuffers(x11_display,x11_window); */ //glXMakeCurrent(x11_display, None, NULL); @@ -165,14 +165,14 @@ int ContextGL_X11::get_window_width() { XWindowAttributes xwa; XGetWindowAttributes(x11_display,x11_window,&xwa); - + return xwa.width; } int ContextGL_X11::get_window_height() { XWindowAttributes xwa; XGetWindowAttributes(x11_display,x11_window,&xwa); - + return xwa.height; } @@ -181,9 +181,9 @@ ContextGL_X11::ContextGL_X11(::Display *p_x11_display,::Window &p_x11_window,con default_video_mode=p_default_video_mode; x11_display=p_x11_display; - + opengl_3_context=p_opengl_3_context; - + double_buffer=false; direct_render=false; glx_minor=glx_major=0; |