Commit 6694366f authored by Thomas Guillem's avatar Thomas Guillem

opengl: converter: rename parent to gl

And unhide the object type. The future cvpx tex converter will need to access
it.
parent 9a69869d
......@@ -67,10 +67,10 @@ tc_anop_get_pool(const opengl_tex_converter_t *tc, const video_format_t *fmt,
{
struct priv *priv = tc->priv;
assert(textures[0] != 0);
priv->stex = SurfaceTexture_create(tc->parent, textures[0]);
priv->stex = SurfaceTexture_create(VLC_OBJECT(tc->gl), textures[0]);
if (priv->stex == NULL)
{
msg_Err(tc->parent, "tc_anop_get_pool: SurfaceTexture_create failed");
msg_Err(tc->gl, "tc_anop_get_pool: SurfaceTexture_create failed");
return NULL;
}
......
......@@ -482,7 +482,7 @@ pbo_map(const opengl_tex_converter_t *tc, picture_t *pic)
if (pic->p[i].p_pixels == NULL)
{
msg_Err(tc->parent, "could not map PBO buffers");
msg_Err(tc->gl, "could not map PBO buffers");
for (i = i - 1; i >= 0; --i)
{
tc->api->BindBuffer(GL_PIXEL_UNPACK_BUFFER,
......@@ -825,7 +825,7 @@ common_init(opengl_tex_converter_t *tc)
&& HasExtension(tc->glexts, "GL_ARB_buffer_storage");
if (supports_pbo)
tc->pf_get_pool = tc_common_get_pool;
msg_Dbg(tc->parent, "PBO support (direct rendering): %s",
msg_Dbg(tc->gl, "PBO support (direct rendering): %s",
supports_pbo ? "On" : "Off");
#endif
......
......@@ -158,8 +158,8 @@ typedef GLuint (*opengl_tex_converter_init_cb)(const video_format_t *fmt,
*/
struct opengl_tex_converter_t
{
/* Pointer to object parent, set by the caller of the init cb */
vlc_object_t *parent;
/* Pointer to object gl, set by the caller of the init cb */
vlc_gl_t *gl;
/* Function pointer to shaders commands, set by the caller of the init cb */
const opengl_shaders_api_t *api;
/* Available gl extensions (from GL_EXTENSIONS) */
......
......@@ -547,7 +547,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
GLuint fragment_shader = 0, sub_fragment_shader;
opengl_tex_converter_t tex_conv;
opengl_tex_converter_t sub_tex_conv = {
.parent = VLC_OBJECT(vgl->gl),
.gl = vgl->gl,
.api = &vgl->api,
.glexts = extensions,
.orientation = fmt->orientation,
......@@ -569,7 +569,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
for (size_t j = 0; j < ARRAY_SIZE(opengl_tex_converter_init_cbs); ++j)
{
tex_conv = (opengl_tex_converter_t) {
.parent = VLC_OBJECT(vgl->gl),
.gl = vgl->gl,
.api = &vgl->api,
.glexts = extensions,
.orientation = fmt->orientation,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment