[vlc-commits] opengl: reference common objects from sampler
Romain Vimont
git at videolan.org
Wed May 20 14:55:45 CEST 2020
vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | 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 <ajanni at videolabs.io>
> 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];
More information about the vlc-commits
mailing list