Frame Buffer Configuration

Frame Buffer Configuration — OpenGL frame buffer configuration object

Synopsis


#include <gdk/gdkgl.h>


enum        GdkGLConfigMode;
struct      GdkGLConfig;
GdkGLConfig* gdk_gl_config_new              (const int *attrib_list);
GdkGLConfig* gdk_gl_config_new_for_screen   (GdkScreen *screen,
                                             const int *attrib_list);
GdkGLConfig* gdk_gl_config_new_by_mode      (GdkGLConfigMode mode);
GdkGLConfig* gdk_gl_config_new_by_mode_for_screen
                                            (GdkScreen *screen,
                                             GdkGLConfigMode mode);
GdkScreen*  gdk_gl_config_get_screen        (GdkGLConfig *glconfig);
gboolean    gdk_gl_config_get_attrib        (GdkGLConfig *glconfig,
                                             int attribute,
                                             int *value);
GdkColormap* gdk_gl_config_get_colormap     (GdkGLConfig *glconfig);
GdkVisual*  gdk_gl_config_get_visual        (GdkGLConfig *glconfig);
gint        gdk_gl_config_get_depth         (GdkGLConfig *glconfig);
gint        gdk_gl_config_get_layer_plane   (GdkGLConfig *glconfig);
gint        gdk_gl_config_get_n_aux_buffers (GdkGLConfig *glconfig);
gint        gdk_gl_config_get_n_sample_buffers
                                            (GdkGLConfig *glconfig);
gboolean    gdk_gl_config_is_rgba           (GdkGLConfig *glconfig);
gboolean    gdk_gl_config_is_double_buffered
                                            (GdkGLConfig *glconfig);
gboolean    gdk_gl_config_is_stereo         (GdkGLConfig *glconfig);
gboolean    gdk_gl_config_has_alpha         (GdkGLConfig *glconfig);
gboolean    gdk_gl_config_has_depth_buffer  (GdkGLConfig *glconfig);
gboolean    gdk_gl_config_has_stencil_buffer
                                            (GdkGLConfig *glconfig);
gboolean    gdk_gl_config_has_accum_buffer  (GdkGLConfig *glconfig);


Object Hierarchy


  GObject
   +----GdkGLConfig

Description

Details

enum GdkGLConfigMode

typedef enum
{
  GDK_GL_MODE_RGB         = 0,
  GDK_GL_MODE_RGBA        = 0,       /* same as RGB */
  GDK_GL_MODE_INDEX       = 1 << 0,
  GDK_GL_MODE_SINGLE      = 0,
  GDK_GL_MODE_DOUBLE      = 1 << 1,
  GDK_GL_MODE_STEREO      = 1 << 2,
  GDK_GL_MODE_ALPHA       = 1 << 3,
  GDK_GL_MODE_DEPTH       = 1 << 4,
  GDK_GL_MODE_STENCIL     = 1 << 5,
  GDK_GL_MODE_ACCUM       = 1 << 6,
  GDK_GL_MODE_MULTISAMPLE = 1 << 7   /* not supported yet */
} GdkGLConfigMode;


struct GdkGLConfig

struct GdkGLConfig;


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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

glconfig : a GdkGLConfig.
Returns : TRUE if the frame buffer has accumulation buffer, FALSE otherwise.