From d2cac06eebea98bc16b140e155af7f11ccce2397 Mon Sep 17 00:00:00 2001 From: Lubosz Sarnecki Date: Mon, 7 Jul 2014 10:51:28 +0200 Subject: [PATCH] glshader: expose opengl handle in getter https://bugzilla.gnome.org/show_bug.cgi?id=734482 --- gst-libs/gst/gl/gstglshader.c | 7 +++++++ gst-libs/gst/gl/gstglshader.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c index de562236f8..4656afdf2d 100644 --- a/gst-libs/gst/gl/gstglshader.c +++ b/gst-libs/gst/gl/gstglshader.c @@ -212,6 +212,13 @@ gst_gl_shader_get_property (GObject * object, } +int +gst_gl_shader_get_program_handle (GstGLShader * shader) +{ + GstGLShaderPrivate *priv = shader->priv; + return (int) priv->program_handle; +} + static void gst_gl_shader_class_init (GstGLShaderClass * klass) { diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h index a56b642f53..e184b6b2e2 100644 --- a/gst-libs/gst/gl/gstglshader.h +++ b/gst-libs/gst/gl/gstglshader.h @@ -67,6 +67,8 @@ GType gst_gl_shader_get_type (void); GstGLShader * gst_gl_shader_new (GstGLContext *context); +int gst_gl_shader_get_program_handle(GstGLShader * shader); + void gst_gl_shader_set_vertex_source (GstGLShader *shader, const gchar *src); void gst_gl_shader_set_fragment_source (GstGLShader *shader, const gchar *src); const gchar * gst_gl_shader_get_vertex_source (GstGLShader *shader); -- 2.34.1