Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

texture.h File Reference


Detailed Description

texture manager

Author:
benjamin gerard

vincent penne

Date:
2002/10/20
Id
texture.h,v 1.11 2003/04/05 16:33:30 ben Exp

#include <arch/types.h>
#include "exheap.h"

Go to the source code of this file.

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_ttexture_lock (texid_t texid, int wait)
 Get a pointer on a texture definition and make sure pixels are not twiddled.

texture_ttexture_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)


dcplaya documentation version 1.2 Generated on January 2004 by doxygen 1.3.5