[882/906] port glcolorscale to GLES2

This commit is contained in:
Matthew Waters 2014-02-11 07:24:40 +11:00
parent 13aa186711
commit 49307fefd6
3 changed files with 16 additions and 10 deletions

View file

@ -21,8 +21,6 @@ OPENGL_SOURCES = \
gstglfilterapp.h \
gstglfilterreflectedscreen.c \
gstglfilterreflectedscreen.h \
gstglcolorscale.c \
gstglcolorscale.h \
gstgldeinterlace.c \
gstgldeinterlace.h \
gltestsrc.c \
@ -74,6 +72,8 @@ libgstopengl_la_SOURCES = \
effects/gstgleffectidentity.c \
effects/gstgleffectmirror.c \
effects/gstgleffectsqueeze.c \
gstglcolorscale.c \
gstglcolorscale.h \
$(OPENGL_SOURCES)
# check order of CFLAGS and LIBS, shouldn't the order be the other way around

View file

@ -143,8 +143,14 @@ gst_gl_colorscale_callback (gint width, gint height, guint texture,
{
GstGLFilter *filter = GST_GL_FILTER (stuff);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
#if GST_GL_HAVE_OPENGL
if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_OPENGL) {
const GstGLFuncs *gl = filter->context->gl_vtable;
gl->MatrixMode (GL_PROJECTION);
gl->LoadIdentity ();
}
#endif
gst_gl_filter_draw_texture (filter, texture, width, height);
}

View file

@ -53,6 +53,7 @@
#include "gstglfiltercube.h"
#include "gstgleffects.h"
#include "gstglcolorscale.h"
GType gst_gl_filter_cube_get_type (void);
GType gst_gl_effects_get_type (void);
@ -64,7 +65,6 @@ GType gst_gl_effects_get_type (void);
#include "gstglfilterapp.h"
#include "gstglfilterreflectedscreen.h"
#include "gstglfiltershader.h"
#include "gstglcolorscale.h"
#include "gstgldeinterlace.h"
#include "gstglmosaic.h"
#include "gstglvideomixer.h"
@ -123,6 +123,11 @@ plugin_init (GstPlugin * plugin)
GST_RANK_NONE, gst_gl_effects_get_type ())) {
return FALSE;
}
if (!gst_element_register (plugin, "glcolorscale",
GST_RANK_NONE, GST_TYPE_GL_COLORSCALE)) {
return FALSE;
}
#if GST_GL_HAVE_OPENGL
if (!gst_element_register (plugin, "gltestsrc",
GST_RANK_NONE, GST_TYPE_GL_TEST_SRC)) {
@ -169,11 +174,6 @@ plugin_init (GstPlugin * plugin)
return FALSE;
}
if (!gst_element_register (plugin, "glcolorscale",
GST_RANK_NONE, GST_TYPE_GL_COLORSCALE)) {
return FALSE;
}
if (!gst_element_register (plugin, "glmosaic",
GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
return FALSE;