Commit 6705f8b3 authored by Romain Vimont's avatar Romain Vimont Committed by Alexandre Janniaux

opengl: do not pass the picture_t to the renderer

The renderer is expected to be independant of the input picture format.
Instead, update the sampler directly.
Signed-off-by: Alexandre Janniaux's avatarAlexandre Janniaux <ajanni@videolabs.io>
parent b773f641
......@@ -764,13 +764,6 @@ static void DrawWithShaders(struct vlc_gl_renderer *renderer)
vt->DrawElements(GL_TRIANGLES, renderer->nb_indices, GL_UNSIGNED_SHORT, 0);
}
int
vlc_gl_renderer_Prepare(struct vlc_gl_renderer *renderer, picture_t *picture)
{
struct vlc_gl_sampler *sampler = renderer->sampler;
return vlc_gl_sampler_Update(sampler, picture);
}
int
vlc_gl_renderer_Draw(struct vlc_gl_renderer *renderer)
{
......
......@@ -117,18 +117,6 @@ vlc_gl_renderer_New(vlc_gl_t *gl, const struct vlc_gl_api *api,
void
vlc_gl_renderer_Delete(struct vlc_gl_renderer *renderer);
/**
* Prepare the fragment shader
*
* Concretely, it allocates OpenGL textures if necessary and uploads the
* picture.
*
* \param sr the renderer
* \param subpicture the subpicture to render
*/
int
vlc_gl_renderer_Prepare(struct vlc_gl_renderer *renderer, picture_t *picture);
/**
* Draw the prepared picture
*
......
......@@ -261,7 +261,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
{
GL_ASSERT_NOERROR(&vgl->api.vt);
int ret = vlc_gl_renderer_Prepare(vgl->renderer, picture);
int ret = vlc_gl_sampler_Update(vgl->sampler, picture);
if (ret != VLC_SUCCESS)
return ret;
......
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