diff options
author | Robert Bragg <robert@linux.intel.com> | 2011-05-17 00:05:54 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2011-06-01 20:44:41 +0100 |
commit | ee7cc9e7889498c7ed3574b85e7294fff1bb45b1 (patch) | |
tree | 6b00799753da1f67e9dd3a60c03b37af26cd81c0 /cogl/cogl-texture.h | |
parent | 80e7e0ef49dfc4b9143a9191d8f862055b5b9998 (diff) | |
download | cogl-ee7cc9e7889498c7ed3574b85e7294fff1bb45b1.tar.gz |
Make CoglTexture2D public as experimental API
This exposes a CoglTexture2D typedef and adds the following experimental
API:
cogl_is_texture_2d
cogl_texture_2d_new_with_size
cogl_texture_2d_new_from_data
cogl_texture_2d_new_from_foreign
Since this is experimental API you need to define
COGL_ENABLE_EXPERIMENTAL_API before including cogl.h.
Note: With these new entrypoints we now expect a CoglContext pointer to
be passed in, instead of assuming there is a default context. The aim is
that for Cogl 2.0 we won't have a default context so this is a step in
that direction.
Diffstat (limited to 'cogl/cogl-texture.h')
-rw-r--r-- | cogl/cogl-texture.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cogl/cogl-texture.h b/cogl/cogl-texture.h index c8968e6a..288a25b2 100644 --- a/cogl/cogl-texture.h +++ b/cogl/cogl-texture.h @@ -45,6 +45,33 @@ G_BEGIN_DECLS #define COGL_TEXTURE_MAX_WASTE 127 /** + * COGL_TEXTURE_ERROR: + * + * #GError domain for texture errors. + * + * Since: 2.0 + * Stability: Unstable + */ +#define COGL_TEXTURE_ERROR (cogl_texture_error_quark ()) + + +/** + * CoglTextureError: + * @COGL_TEXTURE_ERROR_SIZE: Unsupported size + * + * Error codes that can be thrown when allocating textures. + * + * Since: 2.0 + * Stability: Unstable + */ +typedef enum { + COGL_TEXTURE_ERROR_SIZE, + COGL_TEXTURE_ERROR_FORMAT +} CoglTextureError; + +GQuark cogl_texture_error_quark (void); + +/** * cogl_texture_new_with_size: * @width: width of texture in pixels. * @height: height of texture in pixels. |