![]() |
![]() |
![]() |
Libg3d Reference Manual | ![]() |
---|---|---|---|---|
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);
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 |
G3DImage* g3d_texture_load (G3DContext *context, const gchar *filename);
context : |
|
filename : |
|
Returns : |
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 |