![]() |
![]() |
![]() |
COGL 0.8.8 Reference Manual | ![]() |
---|---|---|---|---|
gboolean cogl_create_context (void); void cogl_destroy_context (void); #define COGL_INVALID_HANDLE typedef CoglHandle; void (*CoglFuncPtr) (void); enum CoglFeatureFlags; ClutterFeatureFlags cogl_get_features (void); gboolean cogl_features_available (CoglFeatureFlags features); CoglFuncPtr cogl_get_proc_address (const gchar *name); gboolean cogl_check_extension (const gchar *name, const gchar *ext); void cogl_get_bitmasks (gint *red, gint *green, gint *blue, gint *alpha); void cogl_paint_init (const ClutterColor *color); int cogl_util_next_p2 (int a);
#define COGL_INVALID_HANDLE NULL
A COGL handle that is not valid, used for unitialized handles as well as error conditions.
typedef gpointer CoglHandle;
Type used for storing references to cogl objects, the CoglHandle is a fully opaque type without any public data members.
void (*CoglFuncPtr) (void);
The type used by cogl for function pointers, note that this type is used as a generic catch-all cast for function pointers and the actual arguments and return type may be different.
typedef enum { COGL_FEATURE_TEXTURE_RECTANGLE = (1 << 1), COGL_FEATURE_TEXTURE_NPOT = (1 << 2), COGL_FEATURE_TEXTURE_YUV = (1 << 3), COGL_FEATURE_TEXTURE_READ_PIXELS = (1 << 4), COGL_FEATURE_SHADERS_GLSL = (1 << 5), COGL_FEATURE_OFFSCREEN = (1 << 6), COGL_FEATURE_OFFSCREEN_MULTISAMPLE = (1 << 7), COGL_FEATURE_OFFSCREEN_BLIT = (1 << 8), COGL_FEATURE_FOUR_CLIP_PLANES = (1 << 9), COGL_FEATURE_STENCIL_BUFFER = (1 << 10) } CoglFeatureFlags;
Flags for the supported features.
ClutterFeatureFlags cogl_get_features (void);
Returns all of the features supported by COGL.
Returns : |
A logical OR of all the supported COGL features. |
Since 0.8
gboolean cogl_features_available (CoglFeatureFlags features);
Checks whether the given COGL features are available. Multiple
features can be checked for by or-ing them together with the '|'
operator. TRUE
is only returned if all of the requested features
are available.
|
A bitmask of features to check for |
Returns : |
TRUE if the features are available, FALSE otherwise.
|
CoglFuncPtr cogl_get_proc_address (const gchar *name);
Gets a pointer to a given GL or GL ES extension function. This acts
as a wrapper around glXGetProcAddress()
or whatever is the
appropriate function for the current backend.
|
the name of the function. |
Returns : |
a pointer to the requested function or NULL if the
function is not available.
|
gboolean cogl_check_extension (const gchar *name, const gchar *ext);
Check whether name
occurs in list of extensions in ext
.
|
extension to check for |
|
list of extensions |
Returns : |
TRUE if the extension occurs in the list, FALSE otherwize.
|
void cogl_get_bitmasks (gint *red, gint *green, gint *blue, gint *alpha);
Gets the number of bitplanes used for each of the color components
in the color buffer. Pass NULL
for any of the arguments if the
value is not required.
|
Return location for the number of red bits or NULL
|
|
Return location for the number of green bits or NULL
|
|
Return location for the number of blue bits or NULL
|
|
Return location for the number of alpha bits or NULL
|
void cogl_paint_init (const ClutterColor *color);
Clears the color buffer to color
. The depth buffer and stencil
buffers are also cleared and fogging and lighting are disabled.
|
Background color to clear to |