2007-12-19 Tomas Frydrych <tf@openedhand.com>

* clutter/Makefile.am:
	* clutter/cogl/gl/cogl-defines.h.in:
	* clutter/pango/pangoclutter-render.c:
	* configure.ac:
	Fixes to allow cross-compilation with mingw (patch by Neil
	Roberts).
	Removed trailing whitespace.
This commit is contained in:
Tomas Frydrych 2007-12-19 16:16:10 +00:00
parent bf66f7a3ec
commit 263d8ea5a0
5 changed files with 56 additions and 34 deletions

View File

@ -1,3 +1,13 @@
2007-12-19 Tomas Frydrych <tf@openedhand.com>
* clutter/Makefile.am:
* clutter/cogl/gl/cogl-defines.h.in:
* clutter/pango/pangoclutter-render.c:
* configure.ac:
Fixes to allow cross-compilation with mingw (patch by Neil
Roberts).
Removed trailing whitespace.
2007-12-18 Øyvind Kolås <pippin@o-hand.com> 2007-12-18 Øyvind Kolås <pippin@o-hand.com>
* clutter/clutter-main.c: (generate_enter_leave_events): synthesize * clutter/clutter-main.c: (generate_enter_leave_events): synthesize

View File

@ -18,9 +18,9 @@ INCLUDES = \
-I$(top_srcdir)/clutter/cogl \ -I$(top_srcdir)/clutter/cogl \
-I$(top_srcdir)/clutter/cogl/@CLUTTER_COGL@ \ -I$(top_srcdir)/clutter/cogl/@CLUTTER_COGL@ \
-I$(top_srcdir)/clutter/json \ -I$(top_srcdir)/clutter/json \
-DPREFIX=\""$(prefix)"\" \ -DCLUTTER_PREFIX=\""$(prefix)"\" \
-DLIBDIR=\""$(libdir)"\" \ -DCLUTTER_LIBDIR=\""$(libdir)"\" \
-DDATADIR=\""$(datadir)"\" \ -DCLUTTER_DATADIR=\""$(datadir)"\" \
-DG_DISABLE_DEPRECATED \ -DG_DISABLE_DEPRECATED \
-DG_LOG_DOMAIN=\"Clutter\" \ -DG_LOG_DOMAIN=\"Clutter\" \
-DCLUTTER_JSON_API=1 \ -DCLUTTER_JSON_API=1 \
@ -178,10 +178,10 @@ libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LIBADD = \
@CLUTTER_FLAVOUR@/libclutter-@CLUTTER_FLAVOUR@.la \ @CLUTTER_FLAVOUR@/libclutter-@CLUTTER_FLAVOUR@.la \
cogl/@CLUTTER_COGL@/libclutter-cogl.la \ cogl/@CLUTTER_COGL@/libclutter-cogl.la \
json/libclutter-json.la \ json/libclutter-json.la \
$(backendextralib) $(backendextralib)
libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_SOURCES = \ libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_SOURCES = \
$(source_c) $(source_h) $(source_h_priv) $(source_c) $(source_h) $(source_h_priv)
libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LDFLAGS = $(LDADD) libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LDFLAGS = $(LDADD)

View File

@ -29,7 +29,7 @@
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#include <GL/Glee.h> #include <GL/GLee.h>
#else #else
@ -688,8 +688,8 @@ typedef GLuint COGLuint;
#define CGL_TEXTURE_RECTANGLE_ARB 0 #define CGL_TEXTURE_RECTANGLE_ARB 0
#endif #endif
#ifdef GL_YCBCR_MESA #ifdef GL_YCBCR_MESA
#define CGL_YCBCR_MESA GL_YCBCR_MESA #define CGL_YCBCR_MESA GL_YCBCR_MESA
#define CGL_UNSIGNED_SHORT_8_8_REV_MESA GL_UNSIGNED_SHORT_8_8_REV_MESA #define CGL_UNSIGNED_SHORT_8_8_REV_MESA GL_UNSIGNED_SHORT_8_8_REV_MESA
#define CGL_UNSIGNED_SHORT_8_8_MESA GL_UNSIGNED_SHORT_8_8_MESA #define CGL_UNSIGNED_SHORT_8_8_MESA GL_UNSIGNED_SHORT_8_8_MESA
#else #else

View File

@ -86,7 +86,7 @@ tc_clear ()
static void static void
tc_get (tc_area *area, int width, int height) tc_get (tc_area *area, int width, int height)
{ {
int slice_height; int slice_height;
tc_slice *slice; tc_slice *slice;
area->w = width; area->w = width;
@ -120,8 +120,8 @@ tc_get (tc_area *area, int width, int height)
CLUTTER_NOTE (PANGO, "creating new texture %i x %i", CLUTTER_NOTE (PANGO, "creating new texture %i x %i",
TC_WIDTH, TC_HEIGHT); TC_WIDTH, TC_HEIGHT);
/* Use NPOTS if available as it simply makes shaders easier to /* Use NPOTS if available as it simply makes shaders easier to
* work with on text. * work with on text.
*/ */
if (clutter_feature_available (CLUTTER_FEATURE_TEXTURE_RECTANGLE)) if (clutter_feature_available (CLUTTER_FEATURE_TEXTURE_RECTANGLE))
texture_target_type = CGL_TEXTURE_RECTANGLE_ARB; texture_target_type = CGL_TEXTURE_RECTANGLE_ARB;
@ -139,7 +139,7 @@ tc_get (tc_area *area, int width, int height)
* that should allow rerendering of glyphs to look nice even at scales * that should allow rerendering of glyphs to look nice even at scales
* far below 50%. * far below 50%.
*/ */
cogl_texture_set_filters (texture_target_type, cogl_texture_set_filters (texture_target_type,
CGL_LINEAR, CGL_NEAREST); CGL_LINEAR, CGL_NEAREST);
cogl_texture_image_2d (texture_target_type, cogl_texture_image_2d (texture_target_type,
@ -219,9 +219,9 @@ temp_buffer (size_t size)
if (size > alloc) if (size > alloc)
{ {
size = (size + 4095) & ~4095; size = (size + 4095) & ~4095;
free (buffer); g_free (buffer);
alloc = size; alloc = size;
buffer = malloc (size); buffer = g_malloc (size);
} }
return buffer; return buffer;
@ -371,7 +371,7 @@ draw_glyph (PangoRenderer *renderer_,
cogl_texture_bind (renderer->texture_target_type, g->tex.name); cogl_texture_bind (renderer->texture_target_type, g->tex.name);
cogl_texture_set_alignment (renderer->texture_target_type, cogl_texture_set_alignment (renderer->texture_target_type,
1, bm.stride); 1, bm.stride);
cogl_texture_sub_image_2d (renderer->texture_target_type, cogl_texture_sub_image_2d (renderer->texture_target_type,
@ -383,7 +383,7 @@ draw_glyph (PangoRenderer *renderer_,
CGL_UNSIGNED_BYTE, CGL_UNSIGNED_BYTE,
bm.bitmap); bm.bitmap);
glTexParameteri (renderer->texture_target_type, glTexParameteri (renderer->texture_target_type,
GL_GENERATE_MIPMAP, FALSE); GL_GENERATE_MIPMAP, FALSE);
renderer->curtex = g->tex.name; renderer->curtex = g->tex.name;

View File

@ -18,7 +18,7 @@ m4_define([clutter_binary_age],
AC_PREREQ(2.53) AC_PREREQ(2.53)
AC_INIT([clutter], AC_INIT([clutter],
[clutter_version], [clutter_version],
[http://bugzilla.o-hand.com/enter_bug.cgi?product=Clutter]) [http://bugzilla.o-hand.com/enter_bug.cgi?product=Clutter])
AC_CONFIG_SRCDIR([clutter/clutter.h]) AC_CONFIG_SRCDIR([clutter/clutter.h])
@ -114,12 +114,12 @@ if test x$have_x11 = xno; then
fi fi
if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then
X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"` X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`
fi fi
if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then
X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"` X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`
fi fi
fi fi
PKG_CHECK_MODULES(XFIXES, xfixes >= 4, [have_xfixes=yes], [have_xfixes=no]) PKG_CHECK_MODULES(XFIXES, xfixes >= 4, [have_xfixes=yes], [have_xfixes=no])
if test x$have_xfixes = xyes; then if test x$have_xfixes = xyes; then
AC_DEFINE(HAVE_XFIXES, 1, Have the XFIXES X extension) AC_DEFINE(HAVE_XFIXES, 1, Have the XFIXES X extension)
@ -148,14 +148,26 @@ case $clutterbackend in
AC_CHECK_HEADERS([$clutter_gl_header],, AC_CHECK_HEADERS([$clutter_gl_header],,
[AC_MSG_ERROR([Unable to locate required GL headers])]) [AC_MSG_ERROR([Unable to locate required GL headers])])
AC_CHECK_LIB(GL, glEnable, HAVE_LIBGL=yes, HAVE_LIBGL=no) dnl Use GLee under Windows instead of GL
if test "x$HAVE_LIBGL" = "xno"; then case "$host" in
AC_MSG_ERROR([libGL not found]); *mingw32*)
fi AC_CHECK_LIB(GLee, GLeeInit, HAVE_LIBGLEE=yes, HAVE_LIBGLEE=no, -lopengl32)
if test "x$HAVE_LIBGLEE" = "xno"; then
SDL_LIBS="$SDL_LIBS -lGL" AC_MSG_ERROR([libGLee not found]);
fi fi
SDL_LIBS="$SDL_LIBS -lGLee -lopengl32"
;;
*)
AC_CHECK_LIB(GL, glEnable, HAVE_LIBGL=yes, HAVE_LIBGL=no)
if test "x$HAVE_LIBGL" = "xno"; then
AC_MSG_ERROR([libGL not found]);
fi
SDL_LIBS="$SDL_LIBS -lGL"
;;
esac
fi
;; ;;
glx) glx)
@ -180,15 +192,15 @@ case $clutterbackend in
# xlib pixbuf needed for exporting the stage # xlib pixbuf needed for exporting the stage
BACKEND_PC_FILES="gdk-pixbuf-xlib-2.0" BACKEND_PC_FILES="gdk-pixbuf-xlib-2.0"
GLX_LIBS="$X11_LIBS -lGL" GLX_LIBS="$X11_LIBS -lGL"
GLX_CFLAGS="$X11_CFLAGS" GLX_CFLAGS="$X11_CFLAGS"
backendextra=x11 backendextra=x11
backendextralib="x11/libclutter-x11.la" backendextralib="x11/libclutter-x11.la"
;; ;;
eglx) eglx)
clutter_gl_header="GLES/gl.h" clutter_gl_header="GLES/gl.h"
CLUTTER_FLAVOUR="eglx" CLUTTER_FLAVOUR="eglx"
AC_DEFINE([HAVE_CLUTTER_EGL], 1, [Have the EGL backend]) AC_DEFINE([HAVE_CLUTTER_EGL], 1, [Have the EGL backend])
@ -209,13 +221,13 @@ case $clutterbackend in
if test "x$HAVE_LIBGLES" = "xno"; then if test "x$HAVE_LIBGLES" = "xno"; then
AC_MSG_ERROR([GLES library not found and egl backend requested.]); AC_MSG_ERROR([GLES library not found and egl backend requested.]);
fi fi
EGL_LIBS="gles_cm" EGL_LIBS="gles_cm"
else else
EGL_LIBS="GLES_CM" EGL_LIBS="GLES_CM"
fi fi
# glColor4ub needed for more precise picking, seems presence is a # glColor4ub needed for more precise picking, seems presence is a
# bit random in egl 1.1 (in SDK header, but not lib) # bit random in egl 1.1 (in SDK header, but not lib)
AC_CHECK_LIB($EGL_LIBS, glColor4ub, COLOR4UB=1, COLOR4UB=0) AC_CHECK_LIB($EGL_LIBS, glColor4ub, COLOR4UB=1, COLOR4UB=0)
AC_DEFINE([HAVE_GLES_COLOR4UB], $COLOR4UB, [Have GL/ES glColor4ub]) AC_DEFINE([HAVE_GLES_COLOR4UB], $COLOR4UB, [Have GL/ES glColor4ub])
@ -227,7 +239,7 @@ case $clutterbackend in
;; ;;
eglnative) eglnative)
clutter_gl_header="GLES/gl.h" clutter_gl_header="GLES/gl.h"
CLUTTER_FLAVOUR="eglnative" CLUTTER_FLAVOUR="eglnative"
AC_DEFINE([HAVE_CLUTTER_EGL], 1, [Have the EGL backend]) AC_DEFINE([HAVE_CLUTTER_EGL], 1, [Have the EGL backend])