Cairo-Dock 2.4.0~1
cairo-dock-opengl.h File Reference

Data Structures

struct  _CairoDockGLConfig
 This strucure summarizes the available OpenGL configuration on the system. More...

Functions

gboolean cairo_dock_initialize_opengl_backend (gboolean bForceOpenGL)
void cairo_dock_create_icon_fbo (void)
void cairo_dock_destroy_icon_fbo (void)
gboolean cairo_dock_begin_draw_icon (Icon *pIcon, CairoContainer *pContainer, gint iRenderingMode)
void cairo_dock_end_draw_icon (Icon *pIcon, CairoContainer *pContainer)
void cairo_dock_set_perspective_view (CairoContainer *pContainer)
void cairo_dock_set_ortho_view (CairoContainer *pContainer)
void cairo_dock_apply_desktop_background_opengl (CairoContainer *pContainer)
void cairo_dock_set_gl_capabilities (GtkWidget *pWindow)

Detailed Description

This class manages the OpenGL backend and context.


Function Documentation

gboolean cairo_dock_initialize_opengl_backend ( gboolean  bForceOpenGL)

Initialize the OpenGL backend, by trying to get a suitable GLX configuration.

Parameters:
bForceOpenGLwhether to force the use of OpenGL, or let the function decide.
Returns:
TRUE if OpenGL is usable.
void cairo_dock_create_icon_fbo ( void  )

Create an FBO to render the icons inside a dock.

void cairo_dock_destroy_icon_fbo ( void  )

Destroy the icons FBO.

gboolean cairo_dock_begin_draw_icon ( Icon pIcon,
CairoContainer pContainer,
gint  iRenderingMode 
)

Initiate an OpenGL drawing session on an icon's texture.

Parameters:
pIconthe icon on which to draw.
pContainerits container, or NULL if the icon is not yet inside a container.
iRenderingModerendering mode. 0:normal, 1:don't clear the current texture, so that the drawing will be superimposed on it, 2:keep the current icon texture unchanged for all the drawing (the drawing is made on another texture).
Returns:
TRUE if you can proceed to the drawing, FALSE if an error occured.
void cairo_dock_end_draw_icon ( Icon pIcon,
CairoContainer pContainer 
)

Finish an OpenGL drawing session on an icon.

Parameters:
pIconthe icon on which to draw.
pContainerits container, or NULL if the icon is not yet inside a container.
Returns:
TRUE if you can proceed to the drawing, FALSE if an error occured.
void cairo_dock_set_perspective_view ( CairoContainer pContainer)

Set a perspective view to the current GL context to fit a given ontainer. Perspective view accentuates the depth effect of the scene, but can distort it on the edges, and is difficult to manipulate because the size of objects depends on their position.

Parameters:
pContainerthe container
void cairo_dock_set_ortho_view ( CairoContainer pContainer)

Set an orthogonal view to the current GL context to fit a given ontainer. Orthogonal view is convenient to draw classic 2D, because the objects are not zoomed according to their position. The drawback is a poor depth effect.

Parameters:
pContainerthe container
void cairo_dock_apply_desktop_background_opengl ( CairoContainer pContainer)

Apply the desktop background onto a container, to emulate fake transparency.

Parameters:
pContainerthe container
void cairo_dock_set_gl_capabilities ( GtkWidget *  pWindow)

Set a shared default-initialized GL context on a window.

Parameters:
pWindowthe window, not yet realized.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines