Skip to content
Snippets Groups Projects
Commit f202ba92 authored by Romain Vimont's avatar Romain Vimont Committed by Jean-Baptiste Kempf
Browse files

opengl: expose vlc_gl_t from vlc_gl_filter

This will allow filters to create their own sampler (a vlc_gl_t instance
is necessary).
parent 4c41c138
No related branches found
No related tags found
1 merge request!801Refactor OpenGL filters API and implementation
......@@ -33,11 +33,10 @@
#include "gl_api.h"
#include "sampler_priv.h"
#undef vlc_gl_filter_New
struct vlc_gl_filter *
vlc_gl_filter_New(vlc_object_t *parent, const struct vlc_gl_api *api)
vlc_gl_filter_New(struct vlc_gl_t *gl, const struct vlc_gl_api *api)
{
struct vlc_gl_filter_priv *priv = vlc_object_create(parent, sizeof(*priv));
struct vlc_gl_filter_priv *priv = vlc_object_create(gl, sizeof(*priv));
if (!priv)
return NULL;
......@@ -51,6 +50,7 @@ vlc_gl_filter_New(vlc_object_t *parent, const struct vlc_gl_api *api)
priv->has_picture = false;
struct vlc_gl_filter *filter = &priv->filter;
filter->gl = gl;
filter->api = api;
filter->config.filter_planes = false;
filter->config.blend = false;
......
......@@ -90,6 +90,7 @@ struct vlc_gl_filter {
vlc_object_t obj;
module_t *module;
struct vlc_gl_t *gl;
const struct vlc_gl_api *api;
struct {
......
......@@ -85,8 +85,7 @@ vlc_gl_filter_PRIV(struct vlc_gl_filter *filter)
}
struct vlc_gl_filter *
vlc_gl_filter_New(vlc_object_t *parent, const struct vlc_gl_api *api);
#define vlc_gl_filter_New(o, a) vlc_gl_filter_New(VLC_OBJECT(o), a)
vlc_gl_filter_New(struct vlc_gl_t *gl, const struct vlc_gl_api *api);
int
vlc_gl_filter_LoadModule(vlc_object_t *parent, const char *name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment