cogl: Add API to get the texture from an offscreen

https://bugzilla.gnome.org/show_bug.cgi?id=768976
This commit is contained in:
Jonas Ådahl 2016-05-31 15:44:22 +08:00
parent 7f0e6b9b4b
commit c498bce9e4
2 changed files with 12 additions and 0 deletions

View File

@ -705,6 +705,12 @@ cogl_offscreen_new_with_texture (CoglTexture *texture)
return _cogl_offscreen_new_with_texture_full (texture, 0, 0); return _cogl_offscreen_new_with_texture_full (texture, 0, 0);
} }
CoglTexture *
cogl_offscreen_get_texture (CoglOffscreen *offscreen)
{
return offscreen->texture;
}
static void static void
_cogl_offscreen_free (CoglOffscreen *offscreen) _cogl_offscreen_free (CoglOffscreen *offscreen)
{ {

View File

@ -167,6 +167,12 @@ COGL_DEPRECATED_FOR (cogl_object_unref)
void void
cogl_offscreen_unref (void *offscreen); cogl_offscreen_unref (void *offscreen);
/**
* cogl_offscreen_get_texture: (skip)
*/
CoglTexture *
cogl_offscreen_get_texture (CoglOffscreen *offscreen);
COGL_END_DECLS COGL_END_DECLS
#endif /* __COGL_OFFSCREEN_H__ */ #endif /* __COGL_OFFSCREEN_H__ */