mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
eglglessink: Fix slow path rendering on Android
Specify missing and mandatory params for npot Before calling glTexImage2D. In particular, _WRAP_T and _WRAP_S need to be set to GL_CLAMP_TO_EDGE to avoid all-black rendering with npot sized frames.
This commit is contained in:
parent
f33167f95b
commit
c2cf1fa639
1 changed files with 9 additions and 6 deletions
|
@ -1494,6 +1494,15 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
|
|||
* width and height values when non power of two
|
||||
* and no npot extension available.
|
||||
*/
|
||||
|
||||
/* resizing params */
|
||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
if (got_gl_error ("glTexParameteri"))
|
||||
goto HANDLE_ERROR;
|
||||
|
||||
switch (eglglessink->selected_fmt->fmt) {
|
||||
case GST_EGLGLESSINK_IMAGE_RGB888:
|
||||
glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB,
|
||||
|
@ -1511,12 +1520,6 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
|
|||
if (got_gl_error ("glTexImage2D"))
|
||||
goto HANDLE_ERROR;
|
||||
|
||||
/* resizing params */
|
||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
if (got_gl_error ("glTexParameteri"))
|
||||
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 */
|
||||
|
|
Loading…
Reference in a new issue