cogl-texture: List texture subclass types rather than hardcoding them

Instead of having a hardcoded series of if-statements in
cogl_is_texture to determine which types should appear as texture
subclasses, they are now stored in a GSList attached to the Cogl
context. The list is amended to using a new cogl_texture_register_type
function. There is a convenience macro called COGL_TEXTURE_DEFINE
which uses COGL_HANDLE_DEFINE_WITH_CODE to register the texture type
when the _get_type() function is first called.
This commit is contained in:
Neil Roberts
2010-06-11 13:50:36 +01:00
parent 2f286446af
commit ebb05bcb64
8 changed files with 40 additions and 8 deletions

View File

@ -72,7 +72,7 @@
static void _cogl_atlas_texture_free (CoglAtlasTexture *sub_tex);
COGL_HANDLE_DEFINE (AtlasTexture, atlas_texture);
COGL_TEXTURE_DEFINE (AtlasTexture, atlas_texture);
static const CoglTextureVtable cogl_atlas_texture_vtable;