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:
|
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
|
||||||
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT");
|
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
||||||
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
|
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
|
||||||
break;
|
break;
|
||||||
|
#ifndef OPENGL_ES2
|
||||||
case GL_FRAMEBUFFER_UNDEFINED:
|
case GL_FRAMEBUFFER_UNDEFINED:
|
||||||
GST_ERROR ("GL_FRAMEBUFFER_UNDEFINED");
|
GST_ERROR ("GL_FRAMEBUFFER_UNDEFINED");
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
GST_ERROR ("General FBO error");
|
GST_ERROR ("General FBO error");
|
||||||
}
|
}
|
||||||
|
@ -3379,12 +3378,6 @@ gst_gl_display_thread_do_download_draw_yuv (GstGLDisplay * display)
|
||||||
GstVideoInfo vinfo;
|
GstVideoInfo vinfo;
|
||||||
GstVideoFrame *frame;
|
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
|
#ifdef OPENGL_ES2
|
||||||
GLint viewport_dim[4];
|
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 };
|
GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
|
||||||
#endif
|
#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);
|
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, display->download_fbo);
|
||||||
|
|
||||||
#ifndef OPENGL_ES2
|
#ifndef OPENGL_ES2
|
||||||
|
|
|
@ -170,11 +170,11 @@ _gl_mem_copy_thread (GstGLDisplay * display, gpointer data)
|
||||||
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
||||||
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
|
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
|
||||||
break;
|
break;
|
||||||
|
#ifndef OPENGL_ES2
|
||||||
case GL_FRAMEBUFFER_UNDEFINED:
|
case GL_FRAMEBUFFER_UNDEFINED:
|
||||||
GST_ERROR ("GL_FRAMEBUFFER_UNDEFINED");
|
GST_ERROR ("GL_FRAMEBUFFER_UNDEFINED");
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
GST_ERROR ("Unknown FBO error");
|
GST_ERROR ("Unknown FBO error");
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "gstglshadervariables.h"
|
#include "gstglshadervariables.h"
|
||||||
|
|
||||||
#if !defined(strtok_r) && defined(G_OS_WIN32)
|
#if !defined(strtok_r) && defined(G_OS_WIN32)
|
||||||
|
@ -550,6 +554,7 @@ gst_gl_shadervariable_set (GstGLShader * shader,
|
||||||
(float *) ret->value);
|
(float *) ret->value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifndef OPENGL_ES2
|
||||||
case _mat2x3:
|
case _mat2x3:
|
||||||
gst_gl_shader_set_uniform_matrix_2x3fv (shader, ret->name, ret->count, 0,
|
gst_gl_shader_set_uniform_matrix_2x3fv (shader, ret->name, ret->count, 0,
|
||||||
(float *) ret->value);
|
(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,
|
gst_gl_shader_set_uniform_matrix_4x2fv (shader, ret->name, ret->count, 0,
|
||||||
(float *) ret->value);
|
(float *) ret->value);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case _mat3:
|
case _mat3:
|
||||||
case _mat3x3:
|
case _mat3x3:
|
||||||
gst_gl_shader_set_uniform_matrix_3fv (shader, ret->name, ret->count, 0,
|
gst_gl_shader_set_uniform_matrix_3fv (shader, ret->name, ret->count, 0,
|
||||||
(float *) ret->value);
|
(float *) ret->value);
|
||||||
break;
|
break;
|
||||||
|
#ifndef OPENGL_ES2
|
||||||
case _mat3x4:
|
case _mat3x4:
|
||||||
gst_gl_shader_set_uniform_matrix_3x4fv (shader, ret->name, ret->count, 0,
|
gst_gl_shader_set_uniform_matrix_3x4fv (shader, ret->name, ret->count, 0,
|
||||||
(float *) ret->value);
|
(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,
|
gst_gl_shader_set_uniform_matrix_4x3fv (shader, ret->name, ret->count, 0,
|
||||||
(float *) ret->value);
|
(float *) ret->value);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case _mat4:
|
case _mat4:
|
||||||
case _mat4x4:
|
case _mat4x4:
|
||||||
gst_gl_shader_set_uniform_matrix_4fv (shader, ret->name, ret->count, 0,
|
gst_gl_shader_set_uniform_matrix_4fv (shader, ret->name, ret->count, 0,
|
||||||
|
|
Loading…
Reference in a new issue