mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
eglglessink: Move VBO setup to setcaps
This commit is contained in:
parent
d56d126031
commit
1c008e95b3
1 changed files with 8 additions and 16 deletions
|
@ -1560,22 +1560,7 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
|
|||
if (got_gl_error ("glTexImage2D"))
|
||||
goto HANDLE_ERROR;
|
||||
|
||||
/* XXX: VBO stuff this actually makes more sense on the setcaps stub?
|
||||
* The way it is right now makes this happen only for the first buffer
|
||||
* though so I guess it should work */
|
||||
if (gst_eglglessink_setup_vbo (eglglessink, FALSE)) {
|
||||
/* This makes the rendered fram to fill the whole
|
||||
* surface area.
|
||||
|
||||
glViewport (0, 0, eglglessink->surface_width,
|
||||
eglglessink->surface_height);
|
||||
*/
|
||||
glViewport (0, 0, w, h);
|
||||
} else {
|
||||
GST_ERROR_OBJECT (eglglessink, "VBO setup failed");
|
||||
goto HANDLE_ERROR;
|
||||
}
|
||||
|
||||
glViewport (0, 0, w, h);
|
||||
/* Don't really need to clear surface color
|
||||
* glClearColor (0.0, 0.0, 0.0, 0.0);
|
||||
* glClear (GL_COLOR_BUFFER_BIT);
|
||||
|
@ -1731,6 +1716,13 @@ gst_eglglessink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
|||
}
|
||||
}
|
||||
|
||||
if (!eglglessink->have_vbo) {
|
||||
if (!gst_eglglessink_setup_vbo (eglglessink, FALSE)) {
|
||||
GST_ERROR_OBJECT (eglglessink, "VBO setup failed");
|
||||
goto HANDLE_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
SUCCEED:
|
||||
GST_INFO_OBJECT (eglglessink, "Setcaps succeed");
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue