texture

texture — Texture loading and manipulation

Synopsis




G3DImage*   g3d_texture_load_cached         (G3DContext *context,
                                             G3DModel *model,
                                             const gchar *filename);
G3DImage*   g3d_texture_load                (G3DContext *context,
                                             const gchar *filename);
void        g3d_texture_free                (G3DImage *texture);
gboolean    g3d_texture_prepare             (G3DImage *texture);
gboolean    g3d_texture_flip_y              (G3DImage *texture);
G3DImage*   g3d_texture_merge_alpha         (G3DImage *image,
                                             G3DImage *aimage);

Description

Details

g3d_texture_load_cached ()

G3DImage*   g3d_texture_load_cached         (G3DContext *context,
                                             G3DModel *model,
                                             const gchar *filename);

Loads a texture image from file and attaches it to a hash table in the model. On a second try to load this texture it is returned from cache.

context : a valid context
model : a valid model
filename : the file name of the texture to load
Returns : the texture image

g3d_texture_load ()

G3DImage*   g3d_texture_load                (G3DContext *context,
                                             const gchar *filename);

context :
filename :
Returns :

g3d_texture_free ()

void        g3d_texture_free                (G3DImage *texture);

texture :

g3d_texture_prepare ()

gboolean    g3d_texture_prepare             (G3DImage *texture);

Resizes the image to dimensions which are a power of 2 to be usable as an OpenGL texture. (FIXME: unimplemented)

texture : a texture image
Returns : TRUE on success, FALSE else

g3d_texture_flip_y ()

gboolean    g3d_texture_flip_y              (G3DImage *texture);

texture :
Returns :

g3d_texture_merge_alpha ()

G3DImage*   g3d_texture_merge_alpha         (G3DImage *image,
                                             G3DImage *aimage);

image :
aimage :
Returns :