diff options
Diffstat (limited to 'cogl/cogl-atlas-texture.h')
-rw-r--r-- | cogl/cogl-atlas-texture.h | 55 |
1 files changed, 14 insertions, 41 deletions
diff --git a/cogl/cogl-atlas-texture.h b/cogl/cogl-atlas-texture.h index 53803c63..e4fc5949 100644 --- a/cogl/cogl-atlas-texture.h +++ b/cogl/cogl-atlas-texture.h @@ -67,7 +67,6 @@ typedef struct _CoglAtlasTexture CoglAtlasTexture; * @ctx: A #CoglContext * @width: The width of your atlased texture. * @height: The height of your atlased texture. - * @internal_format: The format of the texture * * Creates a #CoglAtlasTexture with a given @width and @height. A * #CoglAtlasTexture represents a sub-region within one of Cogl's @@ -83,32 +82,28 @@ typedef struct _CoglAtlasTexture CoglAtlasTexture; * using cogl_texture_set_components() and * cogl_texture_set_premultiplied(). * - * <note>This call can fail if Cogl considers the given - * @internal_format incompatible with the format of its internal + * <note>Allocate call can fail if Cogl considers the internal + * format to be incompatible with the format of its internal * atlases.</note> * * <note>The returned #CoglAtlasTexture is a high-level meta-texture * with some limitations. See the documentation for #CoglMetaTexture * for more details.</note> * - * Return value: (transfer full): A new #CoglAtlasTexture object with - * no storage allocated yet or %NULL on failure and @error - * will be updated. + * Returns: (transfer full): A new #CoglAtlasTexture object. * Since: 1.16 * Stability: unstable */ CoglAtlasTexture * cogl_atlas_texture_new_with_size (CoglContext *ctx, int width, - int height, - CoglPixelFormat internal_format, - CoglError **error); + int height); /** * cogl_atlas_texture_new_from_file: * @ctx: A #CoglContext * @filename: the file to load - * @internal_format: The format of the texture + * @error: A #CoglError to catch exceptional errors or %NULL * * Creates a #CoglAtlasTexture from an image file. A #CoglAtlasTexture * represents a sub-region within one of Cogl's shared texture @@ -124,8 +119,8 @@ cogl_atlas_texture_new_with_size (CoglContext *ctx, * using cogl_texture_set_components() and * cogl_texture_set_premultiplied(). * - * <note>Allocation can fail later if Cogl considers the given - * @internal_format incompatible with the format of its internal + * <note>Allocate call can fail if Cogl considers the internal + * format to be incompatible with the format of its internal * atlases.</note> * * <note>The returned #CoglAtlasTexture is a high-level meta-texture @@ -140,7 +135,6 @@ cogl_atlas_texture_new_with_size (CoglContext *ctx, CoglAtlasTexture * cogl_atlas_texture_new_from_file (CoglContext *ctx, const char *filename, - CoglPixelFormat internal_format, CoglError **error); /** @@ -149,14 +143,6 @@ cogl_atlas_texture_new_from_file (CoglContext *ctx, * @width: width of texture in pixels * @height: height of texture in pixels * @format: the #CoglPixelFormat the buffer is stored in in RAM - * @internal_format: the #CoglPixelFormat to use for the GPU storage of the - * texture. If %COGL_PIXEL_FORMAT_ANY is given then a premultiplied - * format similar to the format of the source data will be used. The - * default blending equations of Cogl expect premultiplied color data; - * the main use of passing a non-premultiplied format here is if you - * have non-premultiplied source data and are going to adjust the blend - * mode (see cogl_material_set_blend()) or use the data for something - * other than straight blending. * @rowstride: the memory offset in bytes between the start of each * row in @data. A value of 0 will make Cogl automatically * calculate @rowstride from @width and @format. @@ -178,8 +164,8 @@ cogl_atlas_texture_new_from_file (CoglContext *ctx, * cogl_atlas_texture_new_with_size() and then upload data using * cogl_texture_set_data()</note> * - * <note>Allocation can fail if Cogl considers the given - * @internal_format incompatible with the format of its internal + * <note>Allocate call can fail if Cogl considers the internal + * format to be incompatible with the format of its internal * atlases.</note> * * <note>The returned #CoglAtlasTexture is a high-level @@ -196,23 +182,13 @@ cogl_atlas_texture_new_from_data (CoglContext *ctx, int width, int height, CoglPixelFormat format, - CoglPixelFormat internal_format, int rowstride, const uint8_t *data, CoglError **error); /** * cogl_atlas_texture_new_from_bitmap: - * @bmp: A #CoglBitmap - * @internal_format: the #CoglPixelFormat to use for the GPU storage of the - * texture. If %COGL_PIXEL_FORMAT_ANY is given then a premultiplied - * format similar to the format of the source data will be used. The - * default blending equations of Cogl expect premultiplied color data; - * the main use of passing a non-premultiplied format here is if you - * have non-premultiplied source data and are going to adjust the blend - * mode (see cogl_material_set_blend()) or use the data for something - * other than straight blending. - * @error: A #CoglError to catch exceptional errors or %NULL + * @bitmap: A #CoglBitmap * * Creates a new #CoglAtlasTexture texture based on data residing in a * @bitmap. A #CoglAtlasTexture represents a sub-region within one of @@ -229,23 +205,20 @@ cogl_atlas_texture_new_from_data (CoglContext *ctx, * using cogl_texture_set_components() and * cogl_texture_set_premultiplied(). * - * <note>Allocation can fail if Cogl considers the given - * @internal_format incompatible with the format of its internal + * <note>Allocate call can fail if Cogl considers the internal + * format to be incompatible with the format of its internal * atlases.</note> * * <note>The returned #CoglAtlasTexture is a high-level meta-texture * with some limitations. See the documentation for #CoglMetaTexture * for more details.</note> * - * Return value: (transfer full): A new #CoglAtlasTexture object or - * %NULL on failure and @error will be updated. + * Returns: (transfer full): A new #CoglAtlasTexture object. * Since: 1.16 * Stability: unstable */ CoglAtlasTexture * -cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp, - CoglPixelFormat internal_format, - CoglError **error); +cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp); /** * cogl_is_atlas_texture: |