[clutter-gst] Bump Cogl dependency to 1.10
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gst] Bump Cogl dependency to 1.10
- Date: Sun, 3 Feb 2013 14:08:24 +0000 (UTC)
commit dc2d3c0aaea0d06759a797ff1f5425e0851d5df5
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Thu Jan 31 11:33:47 2013 +0000
Bump Cogl dependency to 1.10
Cogl 1.10 introduced new boilerplate for shaders. This commit cleans
up our shaders.
clutter-gst/Makefile.am | 1 -
clutter-gst/clutter-gst-shaders.h | 41 ----------------------------------
clutter-gst/clutter-gst-video-sink.c | 14 +++++------
configure.ac | 11 +++-----
4 files changed, 10 insertions(+), 57 deletions(-)
---
diff --git a/clutter-gst/Makefile.am b/clutter-gst/Makefile.am
index cd67998..837f2e4 100644
--- a/clutter-gst/Makefile.am
+++ b/clutter-gst/Makefile.am
@@ -34,7 +34,6 @@ source_priv_h = \
$(srcdir)/clutter-gst-debug.h \
$(srcdir)/clutter-gst-marshal.h \
$(srcdir)/clutter-gst-private.h \
- $(srcdir)/clutter-gst-shaders.h \
$(NULL)
source_c = \
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index e5a383c..347329d 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -45,7 +45,6 @@
#include "clutter-gst-video-sink.h"
#include "clutter-gst-util.h"
#include "clutter-gst-private.h"
-#include "clutter-gst-shaders.h"
#ifdef CLUTTER_COGL_HAS_GL
/* include assembly shaders */
@@ -78,10 +77,9 @@
#endif
static gchar *ayuv_to_rgba_shader =
- FRAGMENT_SHADER_VARS
"uniform sampler2D tex;"
"void main () {"
- " vec4 color = texture2D (tex, vec2(" TEX_COORD "));"
+ " vec4 color = texture2D (tex, vec2(cogl_tex_coord_in[0]));"
" float y = 1.1640625 * (color.g - 0.0625);"
" float u = color.b - 0.5;"
" float v = color.a - 0.5;"
@@ -89,15 +87,14 @@ static gchar *ayuv_to_rgba_shader =
" color.r = y + 1.59765625 * v;"
" color.g = y - 0.390625 * u - 0.8125 * v;"
" color.b = y + 2.015625 * u;"
- " gl_FragColor = color;" FRAGMENT_SHADER_END "}";
+ " cogl_color_out = color;}";
static gchar *yv12_to_rgba_shader =
- FRAGMENT_SHADER_VARS
"uniform sampler2D ytex;"
"uniform sampler2D utex;"
"uniform sampler2D vtex;"
"void main () {"
- " vec2 coord = vec2(" TEX_COORD ");"
+ " vec2 coord = vec2(cogl_tex_coord_in[0]);"
" float y = 1.1640625 * (texture2D (ytex, coord).g - 0.0625);"
" float u = texture2D (utex, coord).g - 0.5;"
" float v = texture2D (vtex, coord).g - 0.5;"
@@ -105,7 +102,8 @@ static gchar *yv12_to_rgba_shader =
" color.r = y + 1.59765625 * v;"
" color.g = y - 0.390625 * u - 0.8125 * v;"
" color.b = y + 2.015625 * u;"
- " color.a = 1.0;" " gl_FragColor = color;" FRAGMENT_SHADER_END "}";
+ " color.a = 1.0;"
+ " cogl_color_out = color;}";
#define BASE_SINK_CAPS "{ AYUV," \
"YV12," \
@@ -621,7 +619,7 @@ _string_array_to_char_array (char *dst, const char *src[])
}
#endif
-#if defined (HAVE_COGL_1_8) && !defined (HAVE_CLUTTER_OSX)
+#if !defined (HAVE_CLUTTER_OSX)
static gint
get_n_fragment_texture_units (void)
{
diff --git a/configure.ac b/configure.ac
index 5e7f373..481896c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,7 @@ AC_SUBST([CLUTTER_GST_RELEASE_STATUS], [clutter_gst_release_status])
# pkg-config requirements
GLIB_REQ_VERSION=2.18.0
+COGL_REQ_VERSION=1.10.0
CLUTTER_REQ_VERSION=1.6.0
GSTREAMER_REQ_VERSION=1.0.0
GST_PLUGINS_BAD_REQ_VERSION=1.0.0
@@ -140,6 +141,7 @@ dnl ========================================================================
PKG_CHECK_MODULES(CLUTTER_GST,
[clutter-1.0 >= $CLUTTER_REQ_VERSION
+ cogl-1.0 >= $COGL_REQ_VERSION
gio-2.0 >= $GLIB_REQ_VERSION])
dnl ========================================================================
@@ -193,15 +195,10 @@ PKG_CHECK_EXISTS([clutter-osx-1.0],
[
AC_DEFINE([HAVE_CLUTTER_OSX], [1],
["Defined if building Clutter for OS X"])
- ])
-PKG_CHECK_EXISTS([cogl-1.0 >= 1.8.0],
- [
- have_cogl_1_8=yes
- AC_DEFINE([HAVE_COGL_1_8], [1],
- ["Defined if cogl-1.0 >= 1.8.0 is available"])
+ have_cogl_osx=yes
])
-AS_IF([test "x$have_cogl_1_8" != xyes],
+AS_IF([test "x$have_cogl_osx" = xyes],
[
clutter_soname=`$PKG_CONFIG --variable soname_infix clutter-1.0`
AS_CASE([$clutter_soname],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]