~ubuntu-branches/ubuntu/quantal/cairo-dock/quantal

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-opengl.h

Tags: upstream-2.3.0~1
ImportĀ upstreamĀ versionĀ 2.3.0~1

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
/// This strucure summarizes the available OpenGL configuration on the system.
38
38
struct _CairoDockGLConfig {
39
39
        GdkGLConfig *pGlConfig;
40
 
        gboolean bHasBeenForced;
41
40
        gboolean bIndirectRendering;
42
41
        gboolean bAlphaAvailable;
43
42
        gboolean bStencilBufferAvailable;
64
63
 // CONFIGURATION //
65
64
///////////////////
66
65
/** Initialize the OpenGL backend, by trying to get a suitable GLX configuration.
67
 
*@param bToggleIndirectRendering whether to toggle on/off the indirect rendering mode that have been detected by the function (for cards like Radeon 35xx).
68
66
*@param bForceOpenGL whether to force the use of OpenGL, or let the function decide.
69
67
*@return TRUE if OpenGL is usable.
70
68
*/
71
 
gboolean cairo_dock_initialize_opengl_backend (gboolean bToggleIndirectRendering, gboolean bForceOpenGL);
 
69
gboolean cairo_dock_initialize_opengl_backend (gboolean bForceOpenGL);
72
70
 
73
71
#define cairo_dock_opengl_is_safe(...) (g_openglConfig.pGlConfig != NULL && ! g_openglConfig.bIndirectRendering && g_openglConfig.bAlphaAvailable && g_openglConfig.bStencilBufferAvailable)  // bNonPowerOfTwoAvailable et FBO sont detectes une fois qu'on a un contexte OpenGL, on ne peut donc pas les inclure ici.
74
72
 
 
73
/* Toggle on/off the indirect rendering mode (for cards like Radeon 35xx).
 
74
*@param bToggleIndirectRendering whether to toggle on/off the indirect rendering mode that have been detected by the function (for cards like Radeon 35xx).
 
75
*/
 
76
void cairo_dock_force_indirect_rendering (void);
 
77
 
75
78
#define cairo_dock_deactivate_opengl(...) do {\
76
79
        g_bUseOpenGL = FALSE;\
77
 
        g_openglConfig.pGlConfig = NULL; } while (0)
 
80
        memset (&g_openglConfig, 0, sizeof (CairoDockGLConfig)); } while (0)
78
81
 
79
82
  ///////////////////////
80
83
 // RENDER TO TEXTURE //
86
89
*/
87
90
void cairo_dock_destroy_icon_fbo (void);
88
91
 
89
 
/** Create a pbuffer that will fit the icons of the docks. Do nothing it a pbuffer with the correct size already exists.
90
 
*/
91
 
///void cairo_dock_create_icon_pbuffer (void);
92
 
/** Destroy the icons pbuffer.
93
 
*/
94
 
///void cairo_dock_destroy_icon_pbuffer (void);
 
92
/* Create a pbuffer that will fit the icons of the docks. Do nothing it a pbuffer with the correct size already exists.
 
93
*/
 
94
//void cairo_dock_create_icon_pbuffer (void);
 
95
/* Destroy the icons pbuffer.
 
96
*/
 
97
//void cairo_dock_destroy_icon_pbuffer (void);
95
98
 
96
99
/** Initiate an OpenGL drawing session on an icon's texture.
97
100
*@param pIcon the icon on which to draw.