diff options
author | Benjamin Otte <otte@redhat.com> | 2010-04-17 02:56:02 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-04-23 23:30:30 +0200 |
commit | 1818c709dde0b93dd8e27a5e4da5ce77c01ed519 (patch) | |
tree | 17af5a6f805a114ef153002ee53ce888465b24c0 | |
parent | 5004cd3c44bbf0a6d1046082ea58d8c1ce5cb80e (diff) |
gl: Add cairo_gl_surface_get_texture()
-rw-r--r-- | src/cairo-gl-surface.c | 11 | ||||
-rw-r--r-- | src/cairo-gl.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index b16e1d26..64c12397 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -690,6 +690,17 @@ cairo_gl_surface_get_height (cairo_surface_t *abstract_surface) return surface->height; } +unsigned int +cairo_gl_surface_get_texture (cairo_surface_t *abstract_surface) +{ + cairo_gl_surface_t *surface = (cairo_gl_surface_t *) abstract_surface; + + if (! _cairo_surface_is_gl (abstract_surface)) + return 0; + + return surface->tex; +} + void cairo_gl_surface_swapbuffers (cairo_surface_t *abstract_surface) { diff --git a/src/cairo-gl.h b/src/cairo-gl.h index b9ee88a3..50e14994 100644 --- a/src/cairo-gl.h +++ b/src/cairo-gl.h @@ -57,6 +57,9 @@ cairo_gl_surface_get_width (cairo_surface_t *abstract_surface); cairo_public int cairo_gl_surface_get_height (cairo_surface_t *abstract_surface); +cairo_public unsigned int +cairo_gl_surface_get_texture (cairo_surface_t *abstract_surface); + cairo_public void cairo_gl_surface_swapbuffers (cairo_surface_t *surface); |