vlc | branch: master | Romain Vimont <[email protected]> | Tue Feb  4 17:01:50 
2020 +0100| [be6acbc8ce772900d3b6db81845fb4186bbb1e48] | committer: Alexandre 
Janniaux

opengl: reference common objects from sampler

For convenience, expose the vlc_gl_t and the OpenGL virtual table in
sampler.

Signed-off-by: Alexandre Janniaux <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=be6acbc8ce772900d3b6db81845fb4186bbb1e48
---

 modules/video_output/opengl/sampler.c | 2 ++
 modules/video_output/opengl/sampler.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/modules/video_output/opengl/sampler.c 
b/modules/video_output/opengl/sampler.c
index 215ee4bb98..12d6f7bdc9 100644
--- a/modules/video_output/opengl/sampler.c
+++ b/modules/video_output/opengl/sampler.c
@@ -52,6 +52,8 @@ vlc_gl_sampler_New(struct vlc_gl_interop *interop)
     sampler->pl_sh_res = NULL;
 
     sampler->interop = interop;
+    sampler->gl = interop->gl;
+    sampler->vt = interop->vt;
 
 #ifdef HAVE_LIBPLACEBO
     // Create the main libplacebo context
diff --git a/modules/video_output/opengl/sampler.h 
b/modules/video_output/opengl/sampler.h
index 64e5e30e1f..1211f29953 100644
--- a/modules/video_output/opengl/sampler.h
+++ b/modules/video_output/opengl/sampler.h
@@ -50,6 +50,9 @@
  * implicitly available.
  */
 struct vlc_gl_sampler {
+    struct vlc_gl_t *gl;
+    const opengl_vtable_t *vt;
+
     struct {
         GLfloat OrientationMatrix[4*4];
         GLfloat TexCoordsMap[PICTURE_PLANE_MAX][3*3];

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to