[vlc-devel] [PATCH 21/41] opengl: reference common objects from sampler
Romain Vimont
rom1v at videolabs.io
Fri Feb 7 17:42:07 CET 2020
For convenience, expose the vlc_gl_t and the OpenGL virtual table in
sampler.
---
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 d5d4dada58..176b0c8e9e 100644
--- a/modules/video_output/opengl/sampler.c
+++ b/modules/video_output/opengl/sampler.c
@@ -41,6 +41,8 @@ vlc_gl_sampler_New(struct vlc_gl_interop *interop)
return 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 907b517110..2301c14469 100644
--- a/modules/video_output/opengl/sampler.h
+++ b/modules/video_output/opengl/sampler.h
@@ -51,6 +51,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];
--
2.25.0
More information about the vlc-devel
mailing list