diff options
-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); |