visu_openGL

visu_openGL — Define the OS dependent routines related to OpenGL.

Synopsis

#define             GDKGLEXT_MULTIHEAD_SUPPORT
#define             IMPL_BUILTIN_WIN32
#define             IMPL_BUILTIN_X11
#define             IMPL_GTKGLEXT
                    VisuPixmapContext;
GdkGLConfig *       visu_gl_getGLConfig                 (GdkScreen *screen);
XVisualInfo *       visu_gl_getVisualInfo               (Display *dpy,
                                                         int screenId);
GLuint              visu_gl_initFontList                (guint size);
void                visu_gl_setupPixelFormat            (HDC hDC);
void                visu_pixmap_context_free            (VisuPixmapContext *dumpData);
VisuPixmapContext * visu_pixmap_context_new             (guint width,
                                                         guint height);
GArray *            visu_pixmap_getData                 (guint width,
                                                         guint height,
                                                         gboolean hasAlpha);

Description

TODO

Details

GDKGLEXT_MULTIHEAD_SUPPORT

  #define GDKGLEXT_MULTIHEAD_SUPPORT

GtkGlExt support.


IMPL_BUILTIN_WIN32

  #define IMPL_BUILTIN_WIN32

Win32 support.


IMPL_BUILTIN_X11

  #define IMPL_BUILTIN_X11

X11 support.


IMPL_GTKGLEXT

  #define IMPL_GTKGLEXT

GtkGlExt support.


VisuPixmapContext

typedef struct _VisuPixmapContext VisuPixmapContext;

Short way to address _VisuPixmapContext objects.


visu_gl_getGLConfig ()

GdkGLConfig *       visu_gl_getGLConfig                 (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.

visu_gl_getVisualInfo ()

XVisualInfo *       visu_gl_getVisualInfo               (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.

visu_gl_initFontList ()

GLuint              visu_gl_initFontList                (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. [type guint32][transfer none]

visu_gl_setupPixelFormat ()

void                visu_gl_setupPixelFormat            (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.

visu_pixmap_context_free ()

void                visu_pixmap_context_free            (VisuPixmapContext *dumpData);

Free an allocated DumpImage.

dumpData :

an allocated DumpImage object.

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_getData ()

GArray *            visu_pixmap_getData                 (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 visu_ui_gl_widget_getPixmapData() 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_array_unref() after use). [transfer full][element-type gint8]