vincent penne
Files | |
| file | texture.h |
| texture manager | |
Data Structures | |
| struct | texture_t |
| Texture definition type. More... | |
| struct | _texture_create_s |
| Texture creation type. More... | |
Defines | |
| #define | TEXTURE_NAME_MAX 24 |
| Texture name maximum length. | |
Typedefs | |
| typedef int | texid_t |
| Texture idetifier type. | |
| typedef int(* | texture_reader_f )(uint8 *buffer, int n, struct _texture_create_s *tc) |
| Function to get texture data. | |
| typedef _texture_create_s | texture_create_t |
| Texture creation type. | |
Functions | |
| int | texture_init (void) |
| Initialize the texture manager. | |
| void | texture_shutdown (void) |
| Shutdown the texture manager. | |
| texid_t | texture_get (const char *texture_name) |
| Get a texture identifier by name. | |
| texid_t | texture_exist (texid_t texid) |
| Check if a given texture id is valid. | |
| texid_t | texture_dup (texid_t texid, const char *name) |
| Duplicate a texture. | |
| texid_t | texture_create (texture_create_t *creator) |
| Create a new texture. | |
| texid_t | texture_create_flat (const char *name, int width, int height, unsigned int argb) |
| Create a flat texture. | |
| texid_t | texture_create_file (const char *fname, const char *formatstr) |
| Create a new texture from a image file. | |
| int | texture_destroy (texid_t texid, int force) |
| Destroy a texture. | |
| int | texture_reference (texid_t texid, int count) |
| Add, remove or get texture reference counter. | |
| texture_t * | texture_lock (texid_t texid, int wait) |
| Get a pointer on a texture definition and make sure pixels are not twiddled. | |
| texture_t * | texture_fastlock (texid_t texid, int wait) |
| Get a pointer on a texture definition without de-twiddling. | |
| void | texture_release (texture_t *t) |
| Release a previously locked texture. | |
| void | texture_collector (void) |
| Perform texture garbage colector. | |
| const char * | texture_formatstr (int format) |
| Get texture format string. | |
| int | texture_strtoformat (const char *formatstr) |
| Get texture format from a format string. | |
| void | texture_memstats () |
| Display statistics about the video memory. | |
| int | texture_twiddle (texture_t *t, int wanted) |
| Twiddle or de-twiddle a texture as required. | |
| int | texture_twiddlable (texture_t *t) |
|
|
Function to get texture data. The texture_reader_f function is called by the texture_create() function to get the texture bitmap. |
|
|
Shutdown the texture manager. The texture_shutdown() function free all texture without verifying that all textures has been released. |
|
|
Get a texture identifier by name.
|
|
|
Check if a given texture id is valid.
|
|
||||||||||||
|
Duplicate a texture. The texture_dup() function duplicates a texture. Everything gets copied including texture bitmap.
|
|
|
Create a new texture. The texture_create() function creates a new texture from a texture_create_t creator. This creator contains the basic information for the new texture (name, dimension, format...) and a function which is call the reader that wiil be call to get texture bitmap. This reader function recieve the creator as parameter. Any supplemental information could be put after the required creator data such as FILE or memory pointer.
|
|
||||||||||||||||||||
|
Create a flat texture.
|
|
||||||||||||
|
Create a new texture from a image file. The texture_create_file() tries to load an file via the image translator LoadImageFile() function. And creates a texture with it.
|
|
|
Get texture format string. The function texture_formatstr() returns a string that describe a texture format. Currently it is only describes the "ARGB" pixel format. The returned string is 4 char long and each char gives the number of bit of a channel in this order Alpha, Red, Green and Blue.
|
|
|
Get texture format from a format string.
|
|
||||||||||||
|
Twiddle or de-twiddle a texture as required. The texture_twiddle() checks if the texture is twiddlable by calling the texture_twiddlable() function. If texture is twiddlable the fucntion performs neccessary operations to set the texture twiddle stat as wanted.
|
| dcplaya documentation version 1.2 | Generated on January 2004 by doxygen 1.3.5 |