Update/clean and apply the async-texture patch from bug #1144

This commit is contained in:
Chris Lord
2009-01-07 17:02:43 +00:00
parent df3667dd3a
commit 0866b07f30
5 changed files with 110 additions and 24 deletions

View File

@@ -134,6 +134,26 @@ CoglHandle cogl_texture_new_from_foreign (GLuint gl_handle,
GLuint y_pot_waste,
CoglPixelFormat format);
/**
* cogl_texture_new_from_bitmap:
* @handle: handle of the preloaded texture.
* @max_waste: maximum extra horizontal and|or vertical margin pixels to make
* texture fit GPU limitations.
* @auto_mipmap: enable or disable automatic generation of mipmap pyramid
* from the base level image whenever it is updated.
* @internal_format: the #CoglPixelFormat to use for the GPU storage of the
* texture.
*
* Create a cogl texture from a #CoglBitmap.
*
* Returns: a #CoglHandle to the newly created texture or COGL_INVALID_HANDLE
* if creating the texture failed.
*/
CoglHandle cogl_texture_new_from_bitmap (CoglBitmap *bitmap,
gint max_waste,
gboolean auto_mipmap,
CoglPixelFormat internal_format);
/**
* cogl_is_texture:
* @handle: A CoglHandle
@@ -385,6 +405,28 @@ void cogl_texture_polygon (CoglHandle handle,
CoglTextureVertex *vertices,
gboolean use_color);
/**
* cogl_bitmap_new_from_file:
* @filename: the file to load.
* @error: a #GError or %NULL.
*
* Load an image file from disk. This function can be safely called from
* within a thread.
*
* Returns: A #CoglBitmap to the new loaded image data, or %NULL if loading
* the image failed.
*/
CoglBitmap * cogl_bitmap_new_from_file (const gchar *filename,
GError **error);
/**
* cogl_bitmap_free:
* @bmp: a #CoglBitmap.
*
* Frees a #CoglBitmap.
*/
void cogl_bitmap_free (CoglBitmap *bmp);
G_END_DECLS
#endif /* __COGL_TEXTURE_H__ */