Hey Matthew,

On Fri, 2006-09-15 at 16:49 +0100, Matthew Allum wrote:
> Hi;
> 
> On Fri, 2006-09-15 at 14:12 +0100, Bastien Nocera wrote:
> > 
> > I saw in the clutter TODO list, the line:
> >  - More portability - GL ES, DirectFB?, Windows, Mac ?
> > 
> > Wouldn't it be a good idea to remove direct X calls, and use GTK+/GDK
> > instead? 
> 
> Check the backends branch in SVN, this currently very roughly implements
> an EGL+GLES backend. You'll need to configure with --enable-egl and for
> a basic non h/w accel EGL/GLES implementation grab;
> http://svn.o-hand.com/repos/misc/trunk/ogles/ . 
> 
> It may need some poking for it to work for you, its *very* experimental
> proof of concept code atm.
> 
> This branch basically moves all windowing system dependent code into
> clutter-stage. Hopefully the code should explain the general plan for
> portability.  
> 
> The big problem in this branch is all the GL calls need abstracting out
> properly as to work well across both GL and GLES ( there is some overlap
> but not totally ). 

Will test. Little patch attached for me to be able to compile it, but I
don't know how to make use of the library.

> > It would certainly cut down the number of things to port, and
> > probably fix bugs like:
> > http://bugzilla.openedhand.com/show_bug.cgi?id=100
> > 
> > Is there any reasons why pure-X is preferred to using GDK/GTK+?
> > 
> 
> Historical raisins and probably that I know xlib better than I do
> GDK/GTK+. The reason for still avoiding currently is for what clutter
> needs to actually do currently windowing system wise ( think clutter on
> raw fb ) Im not sure if this justifies the extra dep of GTK at least. I
> am working towards getting clutter on embedded type h/w so GTK as a dep
> could be quite a big deal.  

Yeah, I can imagine that adding GTK+ wouldn't be the smallest of deps.
But I'm wondering what kind of embedded device would have OpenGL, and
not be able to handle GDK (I don't see GTK+ as needed actually).

> We're going to end up using at least a fair amount of xlib-ish calls
> anyway for GLX use of which GDK/GTK does not abstract. 
> 
> Also if you really do want to do more advanced windowing system type
> stuff with the stage you can always use the GTK clutter widget. 

Which craps out for me, on one older machine. I think it's actually DRI
brokenness on my system.

> Re #100, Im not totally convinced use of GTK would solve this and if it
> indeed does surely it wouldn't be that much extra xlib code to fix with
> just xlib. 

I'll look into it, should be small enough.

> For now at least Id like to stick with just xlib, see how the backend
> branch pans out and if we hit a more issues like #100 then by all means
> reconsider.

Well, you're reimplementing keyboard and mouse events as well.
ClutterColor is just convenience functions that could sit on top of
GdkColor, and a large portion of the exported X11 specific commands
could use Gdk and be portable for free.

Removing code is something I quite like :)

> btw, are you hacking something exciting with clutter :) ?

Hehe, is there anything but one application to do with clutter? :)

>   -- Matthew
> 
> PS, Many thanks for all your bugzilla patches - they should mostly be
> merged now.

Yep, I've seen that. Many thanks :)

-- 
Bastien Nocera <[EMAIL PROTECTED]> 
I'm surprised you gave How To Make An American Quilt a four-star rating.
I thought it was just sew-sew.                   -- reader Glenn Cossey
Index: configure.ac
===================================================================
--- configure.ac	(revision 126)
+++ configure.ac	(working copy)
@@ -37,13 +37,24 @@
      AC_MSG_ERROR([Could not find pthread_join in -lpthread.]))
 AC_CHECK_HEADERS([pthread.h])
 
-PKG_CHECK_MODULES(X11, x11)
+PKG_CHECK_MODULES(X11, x11, [have_x11=yes], [have_x11=no])
+if test x$have_x11 = xno
+then
+   AC_PATH_X
+   if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then
+     X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`
+   fi
+   if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then
+     X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`
+   fi
+   X11_LIBS="$X11_LIBS -lX11"
+fi
 
 if test "x$GCC" = "xyes"; then
         GCC_FLAGS="-g -Wall"
 fi
 
-VINCENT_CFLAGS="$X11_FLAGS $PTHREAD_CFLAGS"
+VINCENT_CFLAGS="$X11_CFLAGS $PTHREAD_CFLAGS"
 VINCENT_LIBS="$X11_LIBS $PTHREAD_LIBS"
 
 AC_SUBST(VINCENT_CFLAGS)

Reply via email to