## X Window System Interaction X Window System Interaction — Internal X-related functions |

## Synopsis

    #include <gdk/x11/gdkglx.h>

    gboolean            gdk_x11_gl_query_glx_extension      (GdkGLConfig *glconfig,
                                                             const char *extension);
    GdkGLConfig *       gdk_x11_gl_config_new_from_visualid (VisualID xvisualid);
    GdkGLConfig *       gdk_x11_gl_config_new_from_visualid_for_screen
                                                            (GdkScreen *screen,
                                                             VisualID xvisualid);
    Display *           gdk_x11_gl_config_get_xdisplay      (GdkGLConfig *glconfig);
    int                 gdk_x11_gl_config_get_screen_number (GdkGLConfig *glconfig);
    XVisualInfo *       gdk_x11_gl_config_get_xvinfo        (GdkGLConfig *glconfig);
    gboolean            gdk_x11_gl_config_is_mesa_glx       (GdkGLConfig *glconfig);
    GdkGLContext *      gdk_x11_gl_context_foreign_new      (GdkGLConfig *glconfig,
                                                             GdkGLContext *share_list,
                                                             GLXContext glxcontext);
    GLXContext          gdk_x11_gl_context_get_glxcontext   (GdkGLContext *glcontext);
    GLXPixmap           gdk_x11_gl_pixmap_get_glxpixmap     (GdkGLPixmap *glpixmap);
    Window              gdk_x11_gl_window_get_glxwindow     (GdkGLWindow *glwindow);
    #define             GDK_GL_CONFIG_XDISPLAY              (glconfig)
    #define             GDK_GL_CONFIG_SCREEN_XNUMBER        (glconfig)
    #define             GDK_GL_CONFIG_XVINFO                (glconfig)
    #define             GDK_GL_CONFIG_XCOLORMAP             (glconfig)
    #define             GDK_GL_CONTEXT_GLXCONTEXT           (glcontext)
    #define             GDK_GL_PIXMAP_GLXPIXMAP             (glpixmap)
    #define             GDK_GL_WINDOW_GLXWINDOW             (glwindow)

## Description

## Details

### gdk_x11_gl_query_glx_extension ()

    gboolean            gdk_x11_gl_query_glx_extension      (GdkGLConfig *glconfig,
                                                             const char *extension);

Determines whether a given GLX extension is supported.

`glconfig` : | a GdkGLConfig.
`extension` : | name of GLX extension.
Returns : | TRUE if the GLX extension is supported, FALSE if not supported.

### gdk_x11_gl_config_new_from_visualid ()

    GdkGLConfig *       gdk_x11_gl_config_new_from_visualid (VisualID xvisualid);

Creates GdkGLConfig from given visual ID that specifies the OpenGL-capable visual.

`xvisualid` : | visual ID.
Returns : | the new GdkGLConfig.

### gdk_x11_gl_config_new_from_visualid_for_screen ()

    GdkGLConfig *       gdk_x11_gl_config_new_from_visualid_for_screen
                                                            (GdkScreen *screen,
                                                             VisualID xvisualid);

Creates GdkGLConfig from given visual ID that specifies the OpenGL-capable visual.

`screen` : | target screen.
`xvisualid` : | visual ID.
Returns : | the new GdkGLConfig.

### gdk_x11_gl_config_get_xdisplay ()

    Display *           gdk_x11_gl_config_get_xdisplay      (GdkGLConfig *glconfig);

Gets X Display.

`glconfig` : | a GdkGLConfig.
Returns : | pointer to the Display.

### gdk_x11_gl_config_get_screen_number ()

    int                 gdk_x11_gl_config_get_screen_number (GdkGLConfig *glconfig);

Gets X screen number.

`glconfig` : | a GdkGLConfig.
Returns : | the screen number.

### gdk_x11_gl_config_get_xvinfo ()

    XVisualInfo *       gdk_x11_gl_config_get_xvinfo        (GdkGLConfig *glconfig);

Gets XVisualInfo data.

`glconfig` : | a GdkGLConfig.
Returns : | pointer to the XVisualInfo data.

### gdk_x11_gl_config_is_mesa_glx ()

    gboolean            gdk_x11_gl_config_is_mesa_glx       (GdkGLConfig *glconfig);

Returns whether the server's GLX entension is Mesa.

`glconfig` : | a GdkGLConfig.
Returns : | TRUE if Mesa GLX, FALSE otherwise.

### gdk_x11_gl_context_foreign_new ()

    GdkGLContext *      gdk_x11_gl_context_foreign_new      (GdkGLConfig *glconfig,
                                                             GdkGLContext *share_list,
                                                             GLXContext glxcontext);

Creates GdkGLContext from existing GLXContext.

`glconfig` : | GdkGLConfig that represents the visual the GLXContext uses.
`share_list` : | the GdkGLContext which shares display lists with the GLXContext, or NULL.
`glxcontext` : | exsisting GLXContext.
Returns : | the newly-created GdkGLContext wrapper.

### gdk_x11_gl_context_get_glxcontext ()

    GLXContext          gdk_x11_gl_context_get_glxcontext   (GdkGLContext *glcontext);

Gets GLXContext.

`glcontext` : | a GdkGLContext.
Returns : | the GLXContext.

### gdk_x11_gl_pixmap_get_glxpixmap ()

    GLXPixmap           gdk_x11_gl_pixmap_get_glxpixmap     (GdkGLPixmap *glpixmap);

Gets GLXPixmap.

`glpixmap` : | a GdkGLPixmap.
Returns : | the GLXPixmap.

### gdk_x11_gl_window_get_glxwindow ()

    Window              gdk_x11_gl_window_get_glxwindow     (GdkGLWindow *glwindow);

Gets X Window.

`glwindow` : | a GdkGLWindow.
Returns : | the Window.

### GDK_GL_CONFIG_XDISPLAY()

    #define GDK_GL_CONFIG_XDISPLAY(glconfig)       (GDK_GL_CONFIG_IMPL_X11 (glconfig)->xdisplay)

Gets X Display.

`glconfig` : | a GdkGLConfig.
Returns : | pointer to the Display.

### GDK_GL_CONFIG_SCREEN_XNUMBER()

    #define GDK_GL_CONFIG_SCREEN_XNUMBER(glconfig) (GDK_GL_CONFIG_IMPL_X11 (glconfig)->screen_num)

Gets X screen number.

`glconfig` : | a GdkGLConfig.
Returns : | the screen number.

### GDK_GL_CONFIG_XVINFO()

    #define GDK_GL_CONFIG_XVINFO(glconfig)         (GDK_GL_CONFIG_IMPL_X11 (glconfig)->xvinfo)

Gets XVisualInfo data.

`glconfig` : | a GdkGLConfig.
Returns : | pointer to the XVisualInfo data.

### GDK_GL_CONFIG_XCOLORMAP()

    #define GDK_GL_CONFIG_XCOLORMAP(glconfig)      (GDK_COLORMAP_XCOLORMAP (GDK_GL_CONFIG_IMPL_X11 (glconfig)->colormap))

Gets X Colormap.

`glconfig` : | a GdkGLConfig.
Returns : | the Colormap.

### GDK_GL_CONTEXT_GLXCONTEXT()

    #define GDK_GL_CONTEXT_GLXCONTEXT(glcontext)   (GDK_GL_CONTEXT_IMPL_X11 (glcontext)->glxcontext)

Gets GLXContext.

`glcontext` : | a GdkGLContext.
Returns : | the GLXContext.

### GDK_GL_PIXMAP_GLXPIXMAP()

    #define GDK_GL_PIXMAP_GLXPIXMAP(glpixmap)      (GDK_GL_PIXMAP_IMPL_X11 (glpixmap)->glxpixmap)

Gets GLXPixmap.

`glpixmap` : | a GdkGLPixmap.
Returns : | the GLXPixmap.

### GDK_GL_WINDOW_GLXWINDOW()

    #define GDK_GL_WINDOW_GLXWINDOW(glwindow)      (GDK_GL_WINDOW_IMPL_X11 (glwindow)->glxwindow)

Gets X Window.

`glwindow` : | a GdkGLWindow.
Returns : | the Window.