texture

texture — Texture loading and manipulation

Synopsis




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

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_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