## visu_openGL

visu_openGL — Define the OS dependent routines related to OpenGL.

## Synopsis

    #define             GDKGLEXT_MULTIHEAD_SUPPORT
    #define             IMPL_GTKGLEXT
    #define             IMPL_BUILTIN_X11
    #define             IMPL_BUILTIN_WIN32
                        VisuPixmapContext;
    GArray*             visuOpenGLGet_pixmapData            (guint width,
                                                             guint height,
                                                             gboolean hasAlpha);
    VisuPixmapContext*  visu_pixmap_context_new             (guint width,
                                                             guint height);
    void                visu_pixmap_context_free            (VisuPixmapContext *dumpData);
    GLuint              visuOpenGLinit_fontList             (guint size);
    GdkGLConfig*        visuOpenGLGet_glConfig              (GdkScreen *screen);
    XVisualInfo*        visuOpenGLGet_visualInfo            (Display *dpy,
                                                             int screenId);
    void                visuOpenGLSetup_pixelFormat         (HDC hDC);

## Description

TODO

## Details

### GDKGLEXT_MULTIHEAD_SUPPORT

      #define GDKGLEXT_MULTIHEAD_SUPPORT

### IMPL_GTKGLEXT

      #define IMPL_GTKGLEXT

### IMPL_BUILTIN_X11

      #define IMPL_BUILTIN_X11

### IMPL_BUILTIN_WIN32

      #define IMPL_BUILTIN_WIN32

### VisuPixmapContext

    typedef struct _VisuPixmapContext VisuPixmapContext;

Short way to address VisuPixmapContext_struct objects.

### visuOpenGLGet_pixmapData ()

    GArray*             visuOpenGLGet_pixmapData            (guint width,
                                                             guint height,
                                                             gboolean hasAlpha);

Dump the pixels of the current GL area, assuming that its size is given by `widthx`@height. This method should not be used directly, see `openGLWidgetGet_pixmapData()` to dump a given OpenGL area.

`width` : | an integer ;
`height` : | an integer ;
`hasAlpha` : | if TRUE, read also the alpha channel.
Returns : | newly allocated dump data (use `g_free()` after use).. transfer none. element-type int8.

### visu_pixmap_context_new ()

    VisuPixmapContext*  visu_pixmap_context_new             (guint width,
                                                             guint height);

Create a pixmap storage and a context associated to it. This pixmap can then be used to dump pixel data from an OpenGL area.

`width` : | an integer ;
`height` : | an integer.
Returns : | a newly allocated DumpImage object.. transfer none.

### visu_pixmap_context_free ()

    void                visu_pixmap_context_free            (VisuPixmapContext *dumpData);

Free an allocated DumpImage.

`dumpData` : | an allocated DumpImage object.

### visuOpenGLinit_fontList ()

    GLuint              visuOpenGLinit_fontList             (guint size);

This method create a list with a default font.

`size` : | the size of the text.
Returns : | the GL id of the list storing the font.

### visuOpenGLGet_glConfig ()

    GdkGLConfig*        visuOpenGLGet_glConfig              (GdkScreen *screen);

Call `gdk_gl_config_new_for_screen()`, trying to acquire a RGBA visual with stereo capabilities. This method is used internaly and should not be used elsewhere.

`screen` : | a GdkScreen.
Returns : | a matching GdkGLConfig.

### visuOpenGLGet_visualInfo ()

    XVisualInfo*        visuOpenGLGet_visualInfo            (Display *dpy,
                                                             int screenId);

Call `glXChooseVisual()`, trying to acquire a RGBA visual with stereo capabilities. This method is used internaly and should not be used elsewhere.

`dpy` : | an X display ;
`screenId` : | an X screen id.
Returns : | an allocated XVisualInfo.

### visuOpenGLSetup_pixelFormat ()

    void                visuOpenGLSetup_pixelFormat         (HDC hDC);

Call `ChoosePixelFormat()` and `SetPixelFormat()`, trying to acquire a RGBA visual. This method is used internaly and should not be used elsewhere.

`hDC` : | an HDC.