mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
[567/906] fix OpenGL|ES2 ifdef'ed code
This commit is contained in:
parent
6e6ee999a9
commit
4a424d6d2c
3 changed files with 18 additions and 14 deletions
|
@ -2144,15 +2144,14 @@ gst_gl_display_check_framebuffer_status (void)
|
|||
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
|
||||
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT");
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
||||
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
|
||||
break;
|
||||
|
||||
#ifndef OPENGL_ES2
|
||||
case GL_FRAMEBUFFER_UNDEFINED:
|
||||
GST_ERROR ("GL_FRAMEBUFFER_UNDEFINED");
|
||||
break;
|
||||
|
||||
#endif
|
||||
default:
|
||||
GST_ERROR ("General FBO error");
|
||||
}
|
||||
|
@ -3379,12 +3378,6 @@ gst_gl_display_thread_do_download_draw_yuv (GstGLDisplay * display)
|
|||
GstVideoInfo vinfo;
|
||||
GstVideoFrame *frame;
|
||||
|
||||
frame = display->download_frame;
|
||||
vinfo = frame->info;
|
||||
width = GST_VIDEO_INFO_WIDTH (&vinfo);
|
||||
height = GST_VIDEO_INFO_HEIGHT (&vinfo);
|
||||
video_format = GST_VIDEO_INFO_FORMAT (&vinfo);
|
||||
|
||||
#ifdef OPENGL_ES2
|
||||
GLint viewport_dim[4];
|
||||
|
||||
|
@ -3401,6 +3394,12 @@ gst_gl_display_thread_do_download_draw_yuv (GstGLDisplay * display)
|
|||
GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
|
||||
#endif
|
||||
|
||||
frame = display->download_frame;
|
||||
vinfo = frame->info;
|
||||
width = GST_VIDEO_INFO_WIDTH (&vinfo);
|
||||
height = GST_VIDEO_INFO_HEIGHT (&vinfo);
|
||||
video_format = GST_VIDEO_INFO_FORMAT (&vinfo);
|
||||
|
||||
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, display->download_fbo);
|
||||
|
||||
#ifndef OPENGL_ES2
|
||||
|
|
|
@ -170,11 +170,11 @@ _gl_mem_copy_thread (GstGLDisplay * display, gpointer data)
|
|||
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
||||
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
|
||||
break;
|
||||
|
||||
#ifndef OPENGL_ES2
|
||||
case GL_FRAMEBUFFER_UNDEFINED:
|
||||
GST_ERROR ("GL_FRAMEBUFFER_UNDEFINED");
|
||||
break;
|
||||
|
||||
#endif
|
||||
default:
|
||||
GST_ERROR ("Unknown FBO error");
|
||||
}
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gstglshadervariables.h"
|
||||
|
||||
#if !defined(strtok_r) && defined(G_OS_WIN32)
|
||||
|
@ -550,6 +554,7 @@ gst_gl_shadervariable_set (GstGLShader * shader,
|
|||
(float *) ret->value);
|
||||
break;
|
||||
|
||||
#ifndef OPENGL_ES2
|
||||
case _mat2x3:
|
||||
gst_gl_shader_set_uniform_matrix_2x3fv (shader, ret->name, ret->count, 0,
|
||||
(float *) ret->value);
|
||||
|
@ -569,13 +574,13 @@ gst_gl_shadervariable_set (GstGLShader * shader,
|
|||
gst_gl_shader_set_uniform_matrix_4x2fv (shader, ret->name, ret->count, 0,
|
||||
(float *) ret->value);
|
||||
break;
|
||||
|
||||
#endif
|
||||
case _mat3:
|
||||
case _mat3x3:
|
||||
gst_gl_shader_set_uniform_matrix_3fv (shader, ret->name, ret->count, 0,
|
||||
(float *) ret->value);
|
||||
break;
|
||||
|
||||
#ifndef OPENGL_ES2
|
||||
case _mat3x4:
|
||||
gst_gl_shader_set_uniform_matrix_3x4fv (shader, ret->name, ret->count, 0,
|
||||
(float *) ret->value);
|
||||
|
@ -585,7 +590,7 @@ gst_gl_shadervariable_set (GstGLShader * shader,
|
|||
gst_gl_shader_set_uniform_matrix_4x3fv (shader, ret->name, ret->count, 0,
|
||||
(float *) ret->value);
|
||||
break;
|
||||
|
||||
#endif
|
||||
case _mat4:
|
||||
case _mat4x4:
|
||||
gst_gl_shader_set_uniform_matrix_4fv (shader, ret->name, ret->count, 0,
|
||||
|
|
Loading…
Reference in a new issue