## Frame Buffer Configuration Frame Buffer Configuration — OpenGL frame buffer configuration object |

## Functions

GdkGLConfig * | gdk_gl_config_new ()
GdkGLConfig * | gdk_gl_config_new_for_screen ()
GdkGLConfig * | gdk_gl_config_new_by_mode ()
GdkGLConfig * | gdk_gl_config_new_by_mode_for_screen ()
GdkScreen * | gdk_gl_config_get_screen ()
gboolean | gdk_gl_config_get_attrib ()
GdkColormap * | gdk_gl_config_get_colormap ()
GdkVisual * | gdk_gl_config_get_visual ()
gint | gdk_gl_config_get_depth ()
gint | gdk_gl_config_get_layer_plane ()
gint | gdk_gl_config_get_n_aux_buffers ()
gint | gdk_gl_config_get_n_sample_buffers ()
gboolean | gdk_gl_config_is_rgba ()
gboolean | gdk_gl_config_is_double_buffered ()
gboolean | gdk_gl_config_is_stereo ()
gboolean | gdk_gl_config_has_alpha ()
gboolean | gdk_gl_config_has_depth_buffer ()
gboolean | gdk_gl_config_has_stencil_buffer ()
gboolean | gdk_gl_config_has_accum_buffer ()

## Types and Values

enum | GdkGLConfigMode
| GdkGLConfig

## Object Hierarchy

        GObject
        ╰── GdkGLConfig

## Includes

    #include <gdk/gdkgl.h>

## Description

## Functions

### gdk_gl_config_new ()

    GdkGLConfig *
    gdk_gl_config_new (const int *attrib_list);

Returns an OpenGL frame buffer configuration that match the specified attributes.

attrib_list is a int array that contains the attribute/value pairs. Available attributes are: GDK_GL_USE_GL, GDK_GL_BUFFER_SIZE, GDK_GL_LEVEL, GDK_GL_RGBA, GDK_GL_DOUBLEBUFFER, GDK_GL_STEREO, GDK_GL_AUX_BUFFERS, GDK_GL_RED_SIZE, GDK_GL_GREEN_SIZE, GDK_GL_BLUE_SIZE, GDK_GL_ALPHA_SIZE, GDK_GL_DEPTH_SIZE, GDK_GL_STENCIL_SIZE, GDK_GL_ACCUM_RED_SIZE, GDK_GL_ACCUM_GREEN_SIZE, GDK_GL_ACCUM_BLUE_SIZE, GDK_GL_ACCUM_ALPHA_SIZE.

#### Parameters

attrib_list | a list of attribute/value pairs. The last attribute must be GDK_GL_ATTRIB_LIST_NONE. |

#### Returns

the new GdkGLConfig.

### gdk_gl_config_new_for_screen ()

    GdkGLConfig *
    gdk_gl_config_new_for_screen (GdkScreen *screen,
                                  const int *attrib_list);

Returns an OpenGL frame buffer configuration that match the specified attributes.

#### Parameters

screen | target screen. |
attrib_list | a list of attribute/value pairs. The last attribute must be GDK_GL_ATTRIB_LIST_NONE. |

#### Returns

the new GdkGLConfig.

### gdk_gl_config_new_by_mode ()

    GdkGLConfig *
    gdk_gl_config_new_by_mode (GdkGLConfigMode mode);

Returns an OpenGL frame buffer configuration that match the specified display mode.

#### Parameters

mode | display mode bit mask. |

#### Returns

the new GdkGLConfig.

### gdk_gl_config_new_by_mode_for_screen ()

    GdkGLConfig *
    gdk_gl_config_new_by_mode_for_screen (GdkScreen *screen,
                                          GdkGLConfigMode mode);

Returns an OpenGL frame buffer configuration that match the specified display mode.

#### Parameters

screen | target screen. |
mode | display mode bit mask. |

#### Returns

the new GdkGLConfig.

### gdk_gl_config_get_screen ()

    GdkScreen *
    gdk_gl_config_get_screen (GdkGLConfig *glconfig);

Gets GdkScreen.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

the GdkScreen.

### gdk_gl_config_get_attrib ()

    gboolean
    gdk_gl_config_get_attrib (GdkGLConfig *glconfig,
                              int attribute,
                              int *value);

Gets information about a OpenGL frame buffer configuration.

#### Parameters

glconfig | a GdkGLConfig. |
attribute | the attribute to be returned. |
value | returns the requested value. |

#### Returns

TRUE if it succeeded, FALSE otherwise.

### gdk_gl_config_get_colormap ()

    GdkColormap *
    gdk_gl_config_get_colormap (GdkGLConfig *glconfig);

Gets the GdkColormap that is appropriate for the OpenGL frame buffer configuration.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

the appropriate GdkColormap.

### gdk_gl_config_get_visual ()

    GdkVisual *
    gdk_gl_config_get_visual (GdkGLConfig *glconfig);

Gets the GdkVisual that is appropriate for the OpenGL frame buffer configuration.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

the appropriate GdkVisual.

### gdk_gl_config_get_depth ()

    gint
    gdk_gl_config_get_depth (GdkGLConfig *glconfig);

Gets the color depth of the OpenGL-capable visual.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

number of bits per pixel

### gdk_gl_config_get_layer_plane ()

    gint
    gdk_gl_config_get_layer_plane (GdkGLConfig *glconfig);

Gets the layer plane (level) of the frame buffer. Zero is the default frame buffer. Positive layer planes correspond to frame buffers that overlay the default buffer, and negative layer planes correspond to frame buffers that underlie the default frame buffer.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

layer plane.

### gdk_gl_config_get_n_aux_buffers ()

    gint
    gdk_gl_config_get_n_aux_buffers (GdkGLConfig *glconfig);

Gets the number of auxiliary color buffers.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

number of auxiliary color buffers.

### gdk_gl_config_get_n_sample_buffers ()

    gint
    gdk_gl_config_get_n_sample_buffers (GdkGLConfig *glconfig);

Gets the number of multisample buffers.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

number of multisample buffers.

### gdk_gl_config_is_rgba ()

    gboolean
    gdk_gl_config_is_rgba (GdkGLConfig *glconfig);

Returns whether the configured frame buffer is RGBA mode.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

TRUE if the configured frame buffer is RGBA mode, FALSE otherwise.

### gdk_gl_config_is_double_buffered ()

    gboolean
    gdk_gl_config_is_double_buffered (GdkGLConfig *glconfig);

Returns whether the configuration supports the double-buffered visual.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

TRUE if the double-buffered visual is supported, FALSE otherwise.

### gdk_gl_config_is_stereo ()

    gboolean
    gdk_gl_config_is_stereo (GdkGLConfig *glconfig);

Returns whether the configuration supports the stereo visual.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

TRUE if the stereo visual is supported, FALSE otherwise.

### gdk_gl_config_has_alpha ()

    gboolean
    gdk_gl_config_has_alpha (GdkGLConfig *glconfig);

Returns whether the configured color buffer has alpha bits.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

TRUE if the color buffer has alpha bits, FALSE otherwise.

### gdk_gl_config_has_depth_buffer ()

    gboolean
    gdk_gl_config_has_depth_buffer (GdkGLConfig *glconfig);

Returns whether the configured frame buffer has depth buffer.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

TRUE if the frame buffer has depth buffer, FALSE otherwise.

### gdk_gl_config_has_stencil_buffer ()

    gboolean
    gdk_gl_config_has_stencil_buffer (GdkGLConfig *glconfig);

Returns whether the configured frame buffer has stencil buffer.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

TRUE if the frame buffer has stencil buffer, FALSE otherwise.

### gdk_gl_config_has_accum_buffer ()

    gboolean
    gdk_gl_config_has_accum_buffer (GdkGLConfig *glconfig);

Returns whether the configured frame buffer has accumulation buffer.

#### Parameters

glconfig | a GdkGLConfig. |

#### Returns

TRUE if the frame buffer has accumulation buffer, FALSE otherwise.

## Types and Values

### enum GdkGLConfigMode

#### Members

GDK_GL_MODE_RGB |  |
GDK_GL_MODE_RGBA |  |
GDK_GL_MODE_INDEX |  |
GDK_GL_MODE_SINGLE |  |
GDK_GL_MODE_DOUBLE |  |
GDK_GL_MODE_STEREO |  |
GDK_GL_MODE_ALPHA |  |
GDK_GL_MODE_DEPTH |  |
GDK_GL_MODE_STENCIL |  |
GDK_GL_MODE_ACCUM |  |
GDK_GL_MODE_MULTISAMPLE |  |

### GdkGLConfig

    typedef struct _GdkGLConfig GdkGLConfig;