diff -rNup briquolo-0.5.7/src//CasseBrique.cpp briquolo-0.5.7-pandora/src//CasseBrique.cpp
--- briquolo-0.5.7/src//CasseBrique.cpp	2008-03-22 09:00:11.000000000 -0400
+++ briquolo-0.5.7-pandora/src//CasseBrique.cpp	2011-02-09 19:06:38.000000000 -0500
@@ -329,6 +329,9 @@ void CasseBrique::_ClavierUp(SDL_keysym
     {
       switch (key->sym)
       {
+#ifdef PANDORA
+        case SDLK_LALT:
+#endif
         case SDLK_ESCAPE :
         {
           if (!_MenuBase->GetActivation())
@@ -351,6 +354,9 @@ void CasseBrique::_ClavierUp(SDL_keysym
     {
       switch (key->sym)
       {
+#ifdef PANDORA
+        case SDLK_LALT:
+#endif
         case SDLK_ESCAPE :
         {
           if (!_MenuBase->GetActivation())
diff -rNup briquolo-0.5.7/src//Constante.cpp briquolo-0.5.7-pandora/src//Constante.cpp
--- briquolo-0.5.7/src//Constante.cpp	2008-03-22 05:40:33.000000000 -0400
+++ briquolo-0.5.7-pandora/src//Constante.cpp	2011-01-27 20:18:29.000000000 -0500
@@ -34,6 +34,8 @@
 #else
 #include <unistd.h>
 #endif
+#include <stdlib.h>
+
 
 #ifdef WIN32
   string Constante::_Local("");
diff -rNup briquolo-0.5.7/src//Curseur.cpp briquolo-0.5.7-pandora/src//Curseur.cpp
--- briquolo-0.5.7/src//Curseur.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//Curseur.cpp	2011-02-09 19:27:34.000000000 -0500
@@ -1,6 +1,8 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
+ *  Copyright (C) 2011 Darius Hardy <darius@sephs.no-ip.info>
  *
  *  This file is part of BRIQUOLO
  *
@@ -35,13 +37,16 @@ void Curseur::CodeOpenGL()
   // Mais c'est peut être la faute d'un bug du driver de la Voodoo3 ?
   // De toute façon ça marche sans ça, donc c'est pas très grave
   // (mais c'est moins propre)
+#if !defined(HAVE_GLES)
   glPushAttrib(GL_ALL_ATTRIB_BITS);
 #endif
+#endif
   glColor4f(1,0,0,1);
   glDisable(GL_TEXTURE_2D);
   glDisable(GL_LIGHTING);
 
   glLineWidth(3);
+#if !defined(HAVE_GLES)
   glBegin(GL_LINES);
   // ligne horizontale
   glVertex2f(_Tableau->GetXMin(), _PositionY);
@@ -52,11 +57,26 @@ void Curseur::CodeOpenGL()
   glVertex2f(_PositionX, _Tableau->GetYMax());
 
   glEnd();
+#else
+  GLfloat lines[] = {
+	_Tableau->GetXMin(), _PositionY,
+	_Tableau->GetXMax(), _PositionY,
+	_PositionX, _Tableau->GetYMin(),
+	_PositionX, _Tableau->GetYMax()
+  };
+
+  glEnableClientState(GL_VERTEX_ARRAY);
+  glVertexPointer(2, GL_FLOAT, 0, lines);
+  glDrawArrays(GL_LINES,0, 2*2);
+  glDisableClientState(GL_VERTEX_ARRAY);
+#endif
   
 #ifndef WIN32
   // cf plus haut !
+#if !defined(HAVE_GLES)
   glPopAttrib();  
 #endif
+#endif
 }
 
 void Curseur::SetPosition(float p_X, float p_Y)
diff -rNup briquolo-0.5.7/src//Makefile.am briquolo-0.5.7-pandora/src//Makefile.am
--- briquolo-0.5.7/src//Makefile.am	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//Makefile.am	2011-02-08 20:09:55.000000000 -0500
@@ -115,5 +115,8 @@ TraceBalle.h
 
 briquolo_LDADD = MOGL/libmogl.a
 
+if HAVE_GLES
+  AM_CPPFLAGS=-DHAVE_GLES
+endif
 #INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\"
 INCLUDES = -I@srcdir@/MOGL -I../intl -DSRCTOPDIR=\"@abs_top_srcdir@\"
diff -rNup briquolo-0.5.7/src//Makefile.in briquolo-0.5.7-pandora/src//Makefile.in
--- briquolo-0.5.7/src//Makefile.in	2008-03-24 08:51:50.000000000 -0400
+++ briquolo-0.5.7-pandora/src//Makefile.in	2011-02-08 20:10:13.000000000 -0500
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -61,8 +59,8 @@ am__configure_deps = $(am__aclocal_m4_de
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_briquolo_OBJECTS = Balle.$(OBJEXT) BibliothequeSon.$(OBJEXT) \
 	Bonus.$(OBJEXT) BonusDoubleBalle.$(OBJEXT) BonusFast.$(OBJEXT) \
@@ -91,9 +89,10 @@ am_briquolo_OBJECTS = Balle.$(OBJEXT) Bi
 	Texture.$(OBJEXT) TraceBalle.$(OBJEXT)
 briquolo_OBJECTS = $(am_briquolo_OBJECTS)
 briquolo_DEPENDENCIES = MOGL/libmogl.a
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
@@ -107,18 +106,47 @@ SOURCES = $(briquolo_SOURCES)
 DIST_SOURCES = $(briquolo_SOURCES)
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -151,6 +179,7 @@ HAVE_ASPRINTF = @HAVE_ASPRINTF@
 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
 HAVE_SNPRINTF = @HAVE_SNPRINTF@
 HAVE_WPRINTF = @HAVE_WPRINTF@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -169,6 +198,7 @@ LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGMERGE = @MSGMERGE@
@@ -178,6 +208,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 POSUB = @POSUB@
@@ -195,12 +226,12 @@ XGETTEXT = @XGETTEXT@
 XMKMF = @XMKMF@
 YACC = @YACC@
 YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -212,6 +243,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -241,12 +273,16 @@ program_transform_name = @program_transf
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = MOGL
 briquolo_SOURCES = Balle.cpp \
 Balle.h \
@@ -359,7 +395,7 @@ TraceBalle.cpp \
 TraceBalle.h
 
 briquolo_LDADD = MOGL/libmogl.a
-
+@HAVE_GLES_TRUE@AM_CPPFLAGS = -DHAVE_GLES
 #INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\"
 INCLUDES = -I@srcdir@/MOGL -I../intl -DSRCTOPDIR=\"@abs_top_srcdir@\"
 all: all-recursive
@@ -370,14 +406,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefi
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -395,32 +431,47 @@ $(top_srcdir)/configure:  $(am__configur
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
 
 uninstall-binPROGRAMS:
 	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
 	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 briquolo$(EXEEXT): $(briquolo_OBJECTS) $(briquolo_DEPENDENCIES) 
 	@rm -f briquolo$(EXEEXT)
-	$(CXXLINK) $(briquolo_LDFLAGS) $(briquolo_OBJECTS) $(briquolo_LDADD) $(LIBS)
+	$(CXXLINK) $(briquolo_OBJECTS) $(briquolo_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -485,19 +536,18 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
 
 .cpp.o:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
 
 .cpp.obj:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-uninstall-info-am:
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -506,7 +556,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -523,16 +573,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -558,16 +607,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -575,14 +624,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -594,81 +643,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -679,7 +748,7 @@ all-am: Makefile $(PROGRAMS)
 installdirs: installdirs-recursive
 installdirs-am:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-recursive
 install-exec: install-exec-recursive
@@ -701,6 +770,7 @@ clean-generic:
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -721,18 +791,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -752,23 +842,26 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-uninstall-info: uninstall-info-recursive
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+	ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-binPROGRAMS
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-binPROGRAMS clean-generic clean-recursive ctags \
-	ctags-recursive distclean distclean-compile distclean-generic \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binPROGRAMS \
-	install-data install-data-am install-exec install-exec-am \
-	install-info install-info-am install-man install-strip \
-	installcheck installcheck-am installdirs installdirs-am \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
-	tags tags-recursive uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -rNup briquolo-0.5.7/src//MOGL/eglport.cpp briquolo-0.5.7-pandora/src//MOGL/eglport.cpp
--- briquolo-0.5.7/src//MOGL/eglport.cpp	1969-12-31 19:00:00.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/eglport.cpp	2011-02-07 20:42:50.000000000 -0500
@@ -0,0 +1,258 @@
+/**
+*
+* eglport.c/.h
+* Copyright (C) 2011 Scott Smith
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+#include "eglport.h"
+
+/* Pandora VSync */
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <linux/fb.h>
+
+
+#ifndef FBIO_WAITFORVSYNC
+#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
+#endif
+int fbdev = -1;
+/* Pandora VSync End */
+
+#define EGLNativeWindowType NativeWindowType
+#define EGLNativeDisplayType NativeDisplayType
+
+EGLDisplay g_eglDisplay = 0;
+EGLConfig g_eglConfig = 0;
+EGLContext g_eglContext = 0;
+EGLSurface g_eglSurface = 0;
+
+#define g_totalConfigsIn 20
+int g_totalConfigsFound = 0;
+EGLConfig g_allConfigs[g_totalConfigsIn];
+Display *g_x11Display = NULL;
+
+
+/*======================================================
+ * Kill off any opengl specific details
+  ====================================================*/
+void EGL_Destroy()
+{
+    if( g_eglSurface || g_eglContext || g_eglDisplay )
+    {
+        eglMakeCurrent(g_eglDisplay, NULL, NULL, EGL_NO_CONTEXT);
+        eglDestroyContext(g_eglDisplay, g_eglContext);
+        eglDestroySurface(g_eglDisplay, g_eglSurface);
+        eglTerminate(g_eglDisplay);
+    }
+
+    g_eglSurface = 0;
+    g_eglContext = 0;
+    g_eglDisplay = 0;
+
+	if (g_x11Display)
+		XCloseDisplay(g_x11Display);
+
+    g_x11Display = NULL;
+
+    printf( "EGL Closed\n");
+
+    /* Pandora VSync */
+    close(fbdev);
+    fbdev = -1;
+    /* Pandora VSync End */
+}
+
+/*===========================================================
+Setup EGL context and surface
+===========================================================*/
+int EGL_Init( void )
+{
+    FindAppropriateEGLConfigs();
+
+    int configIndex = 0;
+
+	printf( "Config %d\n", configIndex );
+
+	if (!ConfigureEGL(g_allConfigs[configIndex]))
+	{
+		TestEGLError();
+		fprintf(stderr, "ERROR: Unable to initialise EGL. See previous error.\n");
+		return 1;
+	}
+
+    /* Pandora VSync */
+    fbdev = open ("/dev/fb0", O_RDONLY /* O_RDWR */ );
+    if ( fbdev < 0 ) {
+      fprintf ( stderr, "Couldn't open /dev/fb0 for vsync\n" );
+    }
+    /* Pandora VSync End */
+
+    return 0;
+}
+
+/*===========================================================
+Swap EGL buffers and update the display
+===========================================================*/
+void EGL_SwapBuffers( void )
+{
+    /* Pandora VSync */
+    if ( fbdev >= 0 ) {
+        int arg = 0;
+        ioctl( fbdev, FBIO_WAITFORVSYNC, &arg );
+    }
+    /* Pandora VSync End */
+	eglSwapBuffers(g_eglDisplay, g_eglSurface);
+}
+
+
+/*========================================================
+ *  Init base EGL
+ * ======================================================*/
+int EGL_Open( void )
+{
+    // use EGL to initialise GLES
+    printf( "EGL Open display\n" );
+    g_x11Display = XOpenDisplay(NULL);
+
+    if (!g_x11Display)
+    {
+        fprintf(stderr, "ERROR: unable to get display!\n");
+        return 0;
+    }
+
+    printf( "EGL Get display\n" );
+    g_eglDisplay = eglGetDisplay((EGLNativeDisplayType)g_x11Display);
+
+    if (g_eglDisplay == EGL_NO_DISPLAY)
+    {
+        TestEGLError();
+        fprintf(stderr, "ERROR: Unable to initialise EGL display.\n");
+        return 0;
+    }
+
+    // Initialise egl
+    printf( "EGL Init\n" );
+    if (!eglInitialize(g_eglDisplay, NULL, NULL))
+    {
+        TestEGLError();
+        fprintf(stderr, "ERROR: Unable to initialise EGL display.\n");
+        return 0;
+    }
+
+    return 1;
+}
+
+/*===========================================================
+Initialise OpenGL settings
+===========================================================*/
+int ConfigureEGL(EGLConfig config)
+{
+    // Cleanup in case of a reset
+    if( g_eglSurface || g_eglContext || g_eglDisplay )
+    {
+        eglMakeCurrent(g_eglDisplay, NULL, NULL, EGL_NO_CONTEXT);
+        eglDestroyContext(g_eglDisplay, g_eglContext);
+        eglDestroySurface(g_eglDisplay, g_eglSurface);
+    }
+
+    // Bind GLES and create the context
+    printf( "EGL Bind\n" );
+    eglBindAPI(EGL_OPENGL_ES_API);
+	if (!TestEGLError() )
+	{
+		return 0;
+	}
+
+    printf( "EGL Create Context\n" );
+    g_eglContext = eglCreateContext(g_eglDisplay, config, NULL, NULL);
+    if (g_eglContext == EGL_NO_CONTEXT)
+    {
+        TestEGLError();
+        fprintf(stderr, "ERROR: Unable to create GLES context!\n");
+        return 0;
+    }
+
+    // Get the SDL window handle
+    SDL_SysWMinfo sysInfo; //Will hold our Window information
+    SDL_VERSION(&sysInfo.version); //Set SDL version
+    if(SDL_GetWMInfo(&sysInfo) <= 0)
+    {
+        TestEGLError();
+        fprintf( stderr, "ERROR: Unable to get window handle\n");
+        return 0;
+    }
+
+    printf( "EGL Create window surface\n" );
+    g_eglSurface = eglCreateWindowSurface(g_eglDisplay, config, (EGLNativeWindowType)sysInfo.info.x11.window, 0);
+
+    if ( g_eglSurface == EGL_NO_SURFACE)
+    {
+        TestEGLError();
+        fprintf(stderr, "ERROR: Unable to create EGL surface!\n");
+        return 0;
+    }
+
+    printf( "EGL Make Current\n" );
+    if (eglMakeCurrent(g_eglDisplay,  g_eglSurface,  g_eglSurface, g_eglContext) == EGL_FALSE)
+    {
+        TestEGLError();
+        fprintf(stderr, "ERROR: Unable to make GLES context current\n");
+        return 0;
+    }
+
+    printf( "EGL Done\n" );
+    return 1;
+}
+
+/*=======================================================
+* Detect available video resolutions
+=======================================================*/
+int FindAppropriateEGLConfigs( void )
+{
+    static const EGLint s_configAttribs[] =
+    {
+          EGL_RED_SIZE,     5,
+          EGL_GREEN_SIZE,   6,
+          EGL_BLUE_SIZE,    5,
+          EGL_DEPTH_SIZE,       16,
+          EGL_SURFACE_TYPE,         EGL_WINDOW_BIT,
+          EGL_RENDERABLE_TYPE,      EGL_OPENGL_ES_BIT,
+          EGL_NONE
+    };
+
+    if (eglChooseConfig(g_eglDisplay, s_configAttribs, g_allConfigs, g_totalConfigsIn, &g_totalConfigsFound) != EGL_TRUE || g_totalConfigsFound == 0)
+    {
+        TestEGLError();
+        fprintf(stderr, "ERROR: Unable to query for available configs.\n");
+        return 0;
+    }
+    fprintf(stderr, "Found %d available configs\n", g_totalConfigsFound);
+    return 1;
+}
+
+int TestEGLError( void )
+{
+	EGLint iErr = eglGetError();
+	while (iErr != EGL_SUCCESS)
+	{
+		printf("EGL failed (%d).\n", iErr);
+		return 0;
+	}
+
+	return 1;
+}
diff -rNup briquolo-0.5.7/src//MOGL/eglport.h briquolo-0.5.7-pandora/src//MOGL/eglport.h
--- briquolo-0.5.7/src//MOGL/eglport.h	1969-12-31 19:00:00.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/eglport.h	2011-02-07 20:32:50.000000000 -0500
@@ -0,0 +1,47 @@
+/**
+*
+* eglport.c/.h
+* Copyright (C) 2011 Scott Smith
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+#ifndef EGLPORT_H
+#define EGLPORT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+#include <math.h>
+#include <GLES/gl.h>
+#include <EGL/egl.h>
+#include <SDL/SDL_syswm.h>
+
+void EGL_Destroy( void );
+int EGL_Open( void );
+int EGL_Init( void );
+void EGL_SwapBuffers( void );
+
+int ConfigureEGL(EGLConfig config);
+int FindAppropriateEGLConfigs( void );
+int TestEGLError( void );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // EGLPORT_H
diff -rNup briquolo-0.5.7/src//MOGL/Makefile.am briquolo-0.5.7-pandora/src//MOGL/Makefile.am
--- briquolo-0.5.7/src//MOGL/Makefile.am	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/Makefile.am	2011-02-08 20:10:05.000000000 -0500
@@ -121,4 +121,9 @@ MOGL_TrianglePeau.h \
 MOGL_Univers.cpp \
 MOGL_Univers.h
 
-INCLUDES = -DSRCTOPDIR=\"@abs_top_srcdir@\"
\ Pas de fin de ligne Ã  la fin du fichier.
+if HAVE_GLES
+  libmogl_a_SOURCES+=eglport.c
+  AM_CPPFLAGS=-DHAVE_GLES
+endif
+
+INCLUDES = -DSRCTOPDIR=\"@abs_top_srcdir@\"
diff -rNup briquolo-0.5.7/src//MOGL/Makefile.in briquolo-0.5.7-pandora/src//MOGL/Makefile.in
--- briquolo-0.5.7/src//MOGL/Makefile.in	2008-03-24 08:51:50.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/Makefile.in	2011-02-08 20:10:13.000000000 -0500
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -37,6 +35,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
+@HAVE_GLES_TRUE@am__append_1 = eglport.c
 subdir = src/MOGL
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -60,11 +59,54 @@ am__configure_deps = $(am__aclocal_m4_de
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
 AR = ar
 ARFLAGS = cru
 libmogl_a_AR = $(AR) $(ARFLAGS)
 libmogl_a_LIBADD =
+am__libmogl_a_SOURCES_DIST = MOGL_Action.cpp MOGL_Action.h \
+	MOGL_Afficheur.cpp MOGL_Afficheur.h MOGL_Animation.cpp \
+	MOGL_Animation.h MOGL_Armature.cpp MOGL_Armature.h \
+	MOGL_Bibliotheque.cpp MOGL_Bibliotheque.h MOGL_Bouton.cpp \
+	MOGL_Bouton.h MOGL_Camera.cpp MOGL_Camera.h MOGL_Choix.cpp \
+	MOGL_Choix.h MOGL_ChoixNombre.cpp MOGL_ChoixNombre.h \
+	MOGL_Console.cpp MOGL_Console.h MOGL_Constante.h \
+	MOGL_Constante.cpp MOGL_Direct.cpp MOGL_Direct.h \
+	MOGL_ElementArbre.cpp MOGL_ElementArbre.h MOGL_ElementFacade.h \
+	MOGL_ElementFacade.cpp MOGL_ElementPanneau.cpp \
+	MOGL_ElementPanneau.h MOGL_EnsembleObjet.cpp \
+	MOGL_EnsembleObjet.h MOGL_Facade.cpp MOGL_Facade.h \
+	MOGL_Fenetre.cpp MOGL_Fenetre.h MOGL_FenetreKit.cpp \
+	MOGL_FenetreKit.h MOGL_GenerateurParticule.cpp \
+	MOGL_GenerateurParticule.h MOGL_GenPartFeu.cpp \
+	MOGL_GenPartFeu.h MOGL_GenPartFume.cpp MOGL_GenPartFume.h \
+	MOGL_GestionnaireObjet.cpp MOGL_GestionnaireObjet.h \
+	MOGL_GestionnaireTexture.cpp MOGL_GestionnaireTexture.h \
+	MOGL_GroupeAnimation.cpp MOGL_GroupeAnimation.h MOGL_Image.cpp \
+	MOGL_Image.h MOGL_ImageFacade.cpp MOGL_ImageFacade.h \
+	MOGL_Interface.cpp MOGL_Interface.h MOGL_Label.h \
+	MOGL_Label.cpp MOGL_LensFlare.cpp MOGL_LensFlareFond.cpp \
+	MOGL_LensFlareFond.h MOGL_LensFlare.h MOGL_LensFlareNormal.cpp \
+	MOGL_LensFlareNormal.h MOGL_LensFlareSoleil.cpp \
+	MOGL_LensFlareSoleil.h MOGL_Lumiere.cpp MOGL_Lumiere.h \
+	MOGL_MatriceTransformation.cpp MOGL_MatriceTransformation.h \
+	MOGL_Noeud.cpp MOGL_Noeud.h MOGL_NoeudOpenGL.cpp \
+	MOGL_NoeudOpenGL.h MOGL_Objet.cpp MOGL_Objet.h MOGL_Omni.cpp \
+	MOGL_Omni.h MOGL_Panneau.cpp MOGL_Panneau.h MOGL_Particule.cpp \
+	MOGL_Particule.h MOGL_Peau.cpp MOGL_Peau.h MOGL_Police.cpp \
+	MOGL_Police.h MOGL_PoliceBitmap.cpp MOGL_PoliceBitmap.h \
+	MOGL_PoliceTTF.cpp MOGL_PoliceTTF.h MOGL_Polygone.h \
+	MOGL_Polygone.cpp MOGL_SaisieChaine.cpp MOGL_SaisieChaine.h \
+	MOGL_Separateur.cpp MOGL_Separateur.h MOGL_SignalBase.h \
+	MOGL_Signal.h MOGL_Spot.cpp MOGL_Spot.h MOGL_Strip.cpp \
+	MOGL_Strip.h MOGL_Structure.h MOGL_Temporisation.cpp \
+	MOGL_Temporisation.h MOGL_Temps.cpp MOGL_Temps.h \
+	MOGL_Texte.cpp MOGL_Texte.h MOGL_Texture.cpp MOGL_Texture.h \
+	MOGL_Triangle.cpp MOGL_Triangle.h MOGL_TriangleOmbre.cpp \
+	MOGL_TriangleOmbre.h MOGL_TrianglePeau.cpp MOGL_TrianglePeau.h \
+	MOGL_Univers.cpp MOGL_Univers.h eglport.c
+@HAVE_GLES_TRUE@am__objects_1 = eglport.$(OBJEXT)
 am_libmogl_a_OBJECTS = MOGL_Action.$(OBJEXT) MOGL_Afficheur.$(OBJEXT) \
 	MOGL_Animation.$(OBJEXT) MOGL_Armature.$(OBJEXT) \
 	MOGL_Bibliotheque.$(OBJEXT) MOGL_Bouton.$(OBJEXT) \
@@ -94,29 +136,29 @@ am_libmogl_a_OBJECTS = MOGL_Action.$(OBJ
 	MOGL_Temporisation.$(OBJEXT) MOGL_Temps.$(OBJEXT) \
 	MOGL_Texte.$(OBJEXT) MOGL_Texture.$(OBJEXT) \
 	MOGL_Triangle.$(OBJEXT) MOGL_TriangleOmbre.$(OBJEXT) \
-	MOGL_TrianglePeau.$(OBJEXT) MOGL_Univers.$(OBJEXT)
+	MOGL_TrianglePeau.$(OBJEXT) MOGL_Univers.$(OBJEXT) \
+	$(am__objects_1)
 libmogl_a_OBJECTS = $(am_libmogl_a_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(libmogl_a_SOURCES)
-DIST_SOURCES = $(libmogl_a_SOURCES)
+DIST_SOURCES = $(am__libmogl_a_SOURCES_DIST)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -149,6 +191,7 @@ HAVE_ASPRINTF = @HAVE_ASPRINTF@
 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
 HAVE_SNPRINTF = @HAVE_SNPRINTF@
 HAVE_WPRINTF = @HAVE_WPRINTF@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -167,6 +210,7 @@ LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 MSGMERGE = @MSGMERGE@
@@ -176,6 +220,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 POSUB = @POSUB@
@@ -193,12 +238,12 @@ XGETTEXT = @XGETTEXT@
 XMKMF = @XMKMF@
 YACC = @YACC@
 YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -210,6 +255,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -239,151 +285,76 @@ program_transform_name = @program_transf
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 noinst_LIBRARIES = libmogl.a
-libmogl_a_SOURCES = \
-MOGL_Action.cpp \
-MOGL_Action.h \
-MOGL_Afficheur.cpp \
-MOGL_Afficheur.h \
-MOGL_Animation.cpp \
-MOGL_Animation.h \
-MOGL_Armature.cpp \
-MOGL_Armature.h \
-MOGL_Bibliotheque.cpp \
-MOGL_Bibliotheque.h \
-MOGL_Bouton.cpp \
-MOGL_Bouton.h \
-MOGL_Camera.cpp \
-MOGL_Camera.h \
-MOGL_Choix.cpp \
-MOGL_Choix.h \
-MOGL_ChoixNombre.cpp \
-MOGL_ChoixNombre.h \
-MOGL_Console.cpp \
-MOGL_Console.h \
-MOGL_Constante.h \
-MOGL_Constante.cpp \
-MOGL_Direct.cpp \
-MOGL_Direct.h \
-MOGL_ElementArbre.cpp \
-MOGL_ElementArbre.h \
-MOGL_ElementFacade.h \
-MOGL_ElementFacade.cpp \
-MOGL_ElementPanneau.cpp \
-MOGL_ElementPanneau.h \
-MOGL_EnsembleObjet.cpp \
-MOGL_EnsembleObjet.h \
-MOGL_Facade.cpp \
-MOGL_Facade.h \
-MOGL_Fenetre.cpp \
-MOGL_Fenetre.h \
-MOGL_FenetreKit.cpp \
-MOGL_FenetreKit.h \
-MOGL_GenerateurParticule.cpp \
-MOGL_GenerateurParticule.h \
-MOGL_GenPartFeu.cpp \
-MOGL_GenPartFeu.h \
-MOGL_GenPartFume.cpp \
-MOGL_GenPartFume.h \
-MOGL_GestionnaireObjet.cpp \
-MOGL_GestionnaireObjet.h \
-MOGL_GestionnaireTexture.cpp \
-MOGL_GestionnaireTexture.h \
-MOGL_GroupeAnimation.cpp \
-MOGL_GroupeAnimation.h \
-MOGL_Image.cpp \
-MOGL_Image.h \
-MOGL_ImageFacade.cpp \
-MOGL_ImageFacade.h \
-MOGL_Interface.cpp \
-MOGL_Interface.h \
-MOGL_Label.h \
-MOGL_Label.cpp \
-MOGL_LensFlare.cpp \
-MOGL_LensFlareFond.cpp \
-MOGL_LensFlareFond.h \
-MOGL_LensFlare.h \
-MOGL_LensFlareNormal.cpp \
-MOGL_LensFlareNormal.h \
-MOGL_LensFlareSoleil.cpp \
-MOGL_LensFlareSoleil.h \
-MOGL_Lumiere.cpp \
-MOGL_Lumiere.h \
-MOGL_MatriceTransformation.cpp \
-MOGL_MatriceTransformation.h \
-MOGL_Noeud.cpp \
-MOGL_Noeud.h \
-MOGL_NoeudOpenGL.cpp \
-MOGL_NoeudOpenGL.h \
-MOGL_Objet.cpp \
-MOGL_Objet.h \
-MOGL_Omni.cpp \
-MOGL_Omni.h \
-MOGL_Panneau.cpp \
-MOGL_Panneau.h \
-MOGL_Particule.cpp \
-MOGL_Particule.h \
-MOGL_Peau.cpp \
-MOGL_Peau.h \
-MOGL_Police.cpp \
-MOGL_Police.h \
-MOGL_PoliceBitmap.cpp \
-MOGL_PoliceBitmap.h \
-MOGL_PoliceTTF.cpp \
-MOGL_PoliceTTF.h \
-MOGL_Polygone.h \
-MOGL_Polygone.cpp \
-MOGL_SaisieChaine.cpp \
-MOGL_SaisieChaine.h \
-MOGL_Separateur.cpp \
-MOGL_Separateur.h \
-MOGL_SignalBase.h \
-MOGL_Signal.h \
-MOGL_Spot.cpp \
-MOGL_Spot.h \
-MOGL_Strip.cpp \
-MOGL_Strip.h \
-MOGL_Structure.h \
-MOGL_Temporisation.cpp \
-MOGL_Temporisation.h \
-MOGL_Temps.cpp \
-MOGL_Temps.h \
-MOGL_Texte.cpp \
-MOGL_Texte.h \
-MOGL_Texture.cpp \
-MOGL_Texture.h \
-MOGL_Triangle.cpp \
-MOGL_Triangle.h \
-MOGL_TriangleOmbre.cpp \
-MOGL_TriangleOmbre.h \
-MOGL_TrianglePeau.cpp \
-MOGL_TrianglePeau.h \
-MOGL_Univers.cpp \
-MOGL_Univers.h
-
+libmogl_a_SOURCES = MOGL_Action.cpp MOGL_Action.h MOGL_Afficheur.cpp \
+	MOGL_Afficheur.h MOGL_Animation.cpp MOGL_Animation.h \
+	MOGL_Armature.cpp MOGL_Armature.h MOGL_Bibliotheque.cpp \
+	MOGL_Bibliotheque.h MOGL_Bouton.cpp MOGL_Bouton.h \
+	MOGL_Camera.cpp MOGL_Camera.h MOGL_Choix.cpp MOGL_Choix.h \
+	MOGL_ChoixNombre.cpp MOGL_ChoixNombre.h MOGL_Console.cpp \
+	MOGL_Console.h MOGL_Constante.h MOGL_Constante.cpp \
+	MOGL_Direct.cpp MOGL_Direct.h MOGL_ElementArbre.cpp \
+	MOGL_ElementArbre.h MOGL_ElementFacade.h \
+	MOGL_ElementFacade.cpp MOGL_ElementPanneau.cpp \
+	MOGL_ElementPanneau.h MOGL_EnsembleObjet.cpp \
+	MOGL_EnsembleObjet.h MOGL_Facade.cpp MOGL_Facade.h \
+	MOGL_Fenetre.cpp MOGL_Fenetre.h MOGL_FenetreKit.cpp \
+	MOGL_FenetreKit.h MOGL_GenerateurParticule.cpp \
+	MOGL_GenerateurParticule.h MOGL_GenPartFeu.cpp \
+	MOGL_GenPartFeu.h MOGL_GenPartFume.cpp MOGL_GenPartFume.h \
+	MOGL_GestionnaireObjet.cpp MOGL_GestionnaireObjet.h \
+	MOGL_GestionnaireTexture.cpp MOGL_GestionnaireTexture.h \
+	MOGL_GroupeAnimation.cpp MOGL_GroupeAnimation.h MOGL_Image.cpp \
+	MOGL_Image.h MOGL_ImageFacade.cpp MOGL_ImageFacade.h \
+	MOGL_Interface.cpp MOGL_Interface.h MOGL_Label.h \
+	MOGL_Label.cpp MOGL_LensFlare.cpp MOGL_LensFlareFond.cpp \
+	MOGL_LensFlareFond.h MOGL_LensFlare.h MOGL_LensFlareNormal.cpp \
+	MOGL_LensFlareNormal.h MOGL_LensFlareSoleil.cpp \
+	MOGL_LensFlareSoleil.h MOGL_Lumiere.cpp MOGL_Lumiere.h \
+	MOGL_MatriceTransformation.cpp MOGL_MatriceTransformation.h \
+	MOGL_Noeud.cpp MOGL_Noeud.h MOGL_NoeudOpenGL.cpp \
+	MOGL_NoeudOpenGL.h MOGL_Objet.cpp MOGL_Objet.h MOGL_Omni.cpp \
+	MOGL_Omni.h MOGL_Panneau.cpp MOGL_Panneau.h MOGL_Particule.cpp \
+	MOGL_Particule.h MOGL_Peau.cpp MOGL_Peau.h MOGL_Police.cpp \
+	MOGL_Police.h MOGL_PoliceBitmap.cpp MOGL_PoliceBitmap.h \
+	MOGL_PoliceTTF.cpp MOGL_PoliceTTF.h MOGL_Polygone.h \
+	MOGL_Polygone.cpp MOGL_SaisieChaine.cpp MOGL_SaisieChaine.h \
+	MOGL_Separateur.cpp MOGL_Separateur.h MOGL_SignalBase.h \
+	MOGL_Signal.h MOGL_Spot.cpp MOGL_Spot.h MOGL_Strip.cpp \
+	MOGL_Strip.h MOGL_Structure.h MOGL_Temporisation.cpp \
+	MOGL_Temporisation.h MOGL_Temps.cpp MOGL_Temps.h \
+	MOGL_Texte.cpp MOGL_Texte.h MOGL_Texture.cpp MOGL_Texture.h \
+	MOGL_Triangle.cpp MOGL_Triangle.h MOGL_TriangleOmbre.cpp \
+	MOGL_TriangleOmbre.h MOGL_TrianglePeau.cpp MOGL_TrianglePeau.h \
+	MOGL_Univers.cpp MOGL_Univers.h $(am__append_1)
+@HAVE_GLES_TRUE@AM_CPPFLAGS = -DHAVE_GLES
 INCLUDES = -DSRCTOPDIR=\"@abs_top_srcdir@\"
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .cpp .o .obj
+.SUFFIXES: .c .cpp .o .obj
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/MOGL/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/MOGL/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/MOGL/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/MOGL/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -401,6 +372,7 @@ $(top_srcdir)/configure:  $(am__configur
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstLIBRARIES:
 	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -473,94 +445,115 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MOGL_TriangleOmbre.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MOGL_TrianglePeau.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MOGL_Univers.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eglport.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .cpp.o:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
 
 .cpp.obj:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-uninstall-info-am:
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -588,6 +581,7 @@ clean-generic:
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -608,18 +602,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -639,18 +653,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-noinstLIBRARIES ctags distclean distclean-compile \
 	distclean-generic distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-info-am
+	uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Afficheur.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Afficheur.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Afficheur.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Afficheur.cpp	2011-02-09 19:27:40.000000000 -0500
@@ -1,6 +1,8 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
+ *  Copyright (C) 2011 Darius Hardy <darius@sephs.no-ip.info>
  *
  *  This file is part of BRIQUOLO
  *
@@ -24,6 +26,17 @@
 #include <iostream>
 #include "MOGL_NoeudOpenGL.h"
 
+#if defined(HAVE_GLES)
+// This is to emulate OpenGL's glPolygonMode(GL_LINE|GL_FILL).
+// OpenGL|ES doesn't have GL_LINE so emulate by drawing lines.
+// In the functions that want to draw with GL_LINE set glesPolyFill = GL_FALSE
+// The functions that draw objects test this and render GL_LINE_LOOP rather
+// than GL_TRIANGLE / GL_TRIANGLE_STRIP. Whilst not exact it's near enough.
+static GLboolean glesPolyFill = GL_TRUE;
+#endif
+
+
+
 MOGL_Afficheur::MOGL_Afficheur() : _DernierIdentifiantObjet(0), _DessinerBord(false), _TailleBord(2), _ActiverLumiere(true)
 {
 }
@@ -194,7 +207,7 @@ void MOGL_Afficheur::AfficherOpaque()
   {
     glDisable(GL_LIGHTING);
   }
-        
+ 
   glEnable(GL_DEPTH_TEST);
   glDepthMask( 1 );
   glEnable(GL_CULL_FACE);
@@ -242,7 +255,11 @@ void MOGL_Afficheur::AfficherOpaque()
       glDisable(GL_LIGHTING);
     }
     glCullFace(GL_FRONT);
+#if !defined(HAVE_GLES)
     glPolygonMode(GL_BACK,GL_LINE);
+#else
+    glesPolyFill = GL_FALSE;
+#endif
     _AfficherAbonnementsOpaque(false);
   }
   else
@@ -255,7 +272,11 @@ void MOGL_Afficheur::AfficherOpaque()
       glDisable(GL_LIGHTING);
     }
     glCullFace(GL_FRONT);
+#if !defined(HAVE_GLES)
     glPolygonMode(GL_BACK,GL_LINE);
+#else
+    glesPolyFill = GL_FALSE;
+#endif
 
     _AfficherBordAbonnementsOpaque();
   }
@@ -272,7 +293,11 @@ void MOGL_Afficheur::AfficherOpaque()
   }
 
   glCullFace(GL_BACK);
+#if !defined(HAVE_GLES)
   glPolygonMode(GL_BACK,GL_FILL);
+#else
+  glesPolyFill = GL_TRUE;
+#endif
 
 
   _AfficherAbonnementsOpaque(true);
@@ -341,12 +366,26 @@ void MOGL_Afficheur::AfficherNonOpaque()
   glDisable(GL_BLEND);
   glColor4f(1,0,0,1);
   glPointSize(5);
+#if !defined(HAVE_GLES)
   glBegin(GL_POINTS);
   for (MOGL_ItList_Vecteur itv=_ListPoint.begin(); itv!=_ListPoint.end(); itv++)
   {
     glVertex3f(itv->x, itv->y, itv->z);
   }
   glEnd();
+#else
+  GLfloat vtxl[_ListPoint.size()*3];
+  int i=0;
+  for (MOGL_ItList_Vecteur itv=_ListPoint.begin(); itv!=_ListPoint.end(); itv++) {
+	vtxl[i++]	= itv->x;
+	vtxl[i++]	= itv->y;
+	vtxl[i++]	= itv->z;
+  }
+  glEnableClientState(GL_VERTEX_ARRAY);
+  glVertexPointer(3, GL_FLOAT, 0, vtxl);
+  glDrawArrays(GL_POINTS,0,_ListPoint.size());
+  glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
   glEnable(GL_TEXTURE_2D);
 }
@@ -422,7 +461,14 @@ void MOGL_Afficheur::_AfficherBordAbonne
 
             glVertexPointer(3, GL_FLOAT, 0, ItIdent->second.TabPoint);
 
+#if !defined(HAVE_GLES)
             glDrawArrays(GL_TRIANGLES, 0, ItIdent->second.NbPoint);
+#else
+            if (glesPolyFill == GL_TRUE)
+              glDrawArrays(GL_TRIANGLES, 0, ItIdent->second.NbPoint);
+            else
+              glDrawArrays(GL_LINE_LOOP, 0, ItIdent->second.NbPoint);
+#endif
 
             // Si Mat vaut null, alors les points fournis sont déjà transformés
             if (matrice!=NULL)
@@ -459,7 +505,16 @@ void MOGL_Afficheur::_AfficherBordAbonne
           }
           glVertexPointer(3, GL_FLOAT, 0, ItIdent->second.TabPoint);
 
+
+#if !defined(HAVE_GLES)
           glDrawArrays(GL_TRIANGLE_STRIP, 0, ItIdent->second.NbPoint);
+#else
+          if (glesPolyFill == GL_TRUE)
+            glDrawArrays(GL_TRIANGLE_STRIP, 0, ItIdent->second.NbPoint);
+          else
+            glDrawArrays(GL_LINE_LOOP, 0, ItIdent->second.NbPoint);
+#endif
+
           // Si Mat vaut null, alors les points fournis sont déjà transformés
           if (matrice!=NULL)
           {
@@ -536,7 +591,14 @@ void MOGL_Afficheur::_AfficherAbonnement
             glTexCoordPointer(2, GL_FLOAT, 0, ItIdent->second.TabTexture);
           }
 
+#if !defined(HAVE_GLES)
+          glDrawArrays(GL_TRIANGLES, 0, ItIdent->second.NbPoint);
+#else
+        if (glesPolyFill == GL_TRUE)
           glDrawArrays(GL_TRIANGLES, 0, ItIdent->second.NbPoint);
+        else
+          glDrawArrays(GL_LINE_LOOP, 0, ItIdent->second.NbPoint);
+#endif
 
           // Si Mat vaut null, alors les points fournis sont déjà transformés
           if (matrice!=NULL)
@@ -575,7 +637,15 @@ void MOGL_Afficheur::_AfficherAbonnement
           glTexCoordPointer(2, GL_FLOAT, 0, ItIdent->second.TabTexture);
         }
 
+#if !defined(HAVE_GLES)
         glDrawArrays(GL_TRIANGLE_STRIP, 0, ItIdent->second.NbPoint);
+#else
+        if (glesPolyFill == GL_TRUE)
+          glDrawArrays(GL_TRIANGLE_STRIP, 0, ItIdent->second.NbPoint);
+        else
+          glDrawArrays(GL_LINE_LOOP, 0, ItIdent->second.NbPoint);
+#endif
+
         // Si Mat vaut null, alors les points fournis sont déjà transformés
         if (matrice!=NULL)
         {
@@ -674,7 +744,11 @@ void MOGL_Afficheur::_AfficherAbonnement
       if (texture->GetTypeTexture()==MOGL_Texture::TEXTURE_TRANSPARENTE)
       {
         glDepthMask(1); 
+#if !defined(HAVE_GLES)
         glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+#else
+        glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+#endif
         glEnable(GL_BLEND);
         glDisable(GL_ALPHA_TEST);
       }
@@ -931,12 +1005,20 @@ void MOGL_Afficheur::_AfficherOmbre()
     glBlendFunc(GL_DST_COLOR, GL_ONE);
     glColor4f(1,1,1,1);
     glCullFace(GL_BACK);
+#if !defined(HAVE_GLES)
     glDrawArrays(GL_QUADS, 0, 4*3);
+#else
+    glDrawArrays(GL_TRIANGLE_FAN, 0, 4*3);
+#endif
 
     glBlendFunc(GL_DST_COLOR, GL_ZERO);
     glColor4f(0.5, 0.5, 0.50, 0.50);
     glCullFace(GL_FRONT);
+#if !defined(HAVE_GLES)
     glDrawArrays(GL_QUADS, 0, 4*3);
+#else
+    glDrawArrays(GL_TRIANGLE_FAN, 0, 4*3);
+#endif
   }
 
   // On prépare l'affichage des carré sur toute la surface
@@ -950,39 +1032,95 @@ void MOGL_Afficheur::_AfficherOmbre()
 
   glColor4f(1,1,1,1);
   glBlendFunc(GL_DST_COLOR, GL_ONE);
+#if !defined(HAVE_GLES)
   glBegin(GL_QUADS);
   glVertex2f(-10,-10);
   glVertex2f(10,-10);
   glVertex2f(10,10);
   glVertex2f(-10,10);
   glEnd();      
+#else
+    GLfloat q1[] = {
+	-10,-10,
+	10,-10,
+	10,10,
+	-10,10
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, q1);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+    glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
   glColor4f(1,1,1,1);
   glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);
+#if !defined(HAVE_GLES)
   glBegin(GL_QUADS);
   glVertex2f(-10,-10);
   glVertex2f(10,-10);
   glVertex2f(10,10);
   glVertex2f(-10,10);
   glEnd();
+#else
+    GLfloat q2[] = {
+	-10,-10,
+	10,-10,
+	10,10,
+	-10,10
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, q2);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+    glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
   glColor4f(1,1,1,1);
   glBlendFunc(GL_DST_COLOR, GL_ONE );
+#if !defined(HAVE_GLES)
   glBegin(GL_QUADS);
   glVertex2f(-10,-10);
   glVertex2f(10,-10);
   glVertex2f(10,10);
   glVertex2f(-10,10);
   glEnd();
+#else
+    GLfloat q3[] = {
+	-10,-10,
+	10,-10,
+	10,10,
+	-10,10
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, q3);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+    glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
   glColor4f(0.5,0.5,0.5,0.5);
   glBlendFunc(GL_ONE, GL_ONE );
+#if !defined(HAVE_GLES)
   glBegin(GL_QUADS);
   glVertex2f(-10,-10);
   glVertex2f(10,-10);
   glVertex2f(10,10);
   glVertex2f(-10,10);
   glEnd();
+#else
+    GLfloat q4[] = {
+	-10,-10,
+	10,-10,
+	10,10,
+	-10,10
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, q4);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+    glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
   glPopMatrix();
   glMatrixMode(GL_MODELVIEW);
@@ -1052,6 +1190,7 @@ void MOGL_Afficheur::_AfficherImageOpaqu
   MOGL_ItListe_Image it;
   MOGL_Texture * texture=NULL;
 
+#if !defined(HAVE_GLES)
   glBegin(GL_QUADS);    
   for(it=_ListeImage.begin(); it!=_ListeImage.end(); it++)
   {
@@ -1090,6 +1229,56 @@ void MOGL_Afficheur::_AfficherImageOpaqu
     glVertex3f(it->x-it->tailleX/2, it->y+it->tailleY/2, it->z);
   }
   glEnd();
+#else
+  glEnableClientState(GL_VERTEX_ARRAY);
+  glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+  for(it=_ListeImage.begin(); it!=_ListeImage.end(); it++)
+  {
+    if (it->texture!=texture)
+    {
+      glDisableClientState(GL_VERTEX_ARRAY);
+      glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+
+      texture=it->texture;
+      texture->Selectionner();
+      if (texture->GetAutoriserTrou())
+      {
+        // La valeur alpha de la partie trouée d'une texture trouée vaut 0
+        // Donc on affiche seuleument si alpha > 0.2 (on laisse un peu de marge)
+        glAlphaFunc(GL_GREATER, 0.2f);
+        glEnable(GL_ALPHA_TEST);
+      }
+      else
+      {
+        // La texture n'est pas trouée donc on ne fait pas de test alpha
+        glDisable(GL_ALPHA_TEST);
+      }
+      glEnableClientState(GL_VERTEX_ARRAY);
+      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+    }
+    GLfloat vtx0[] = {
+        it->x-it->tailleX/2, it->y-it->tailleY/2, it->z,
+	it->x+it->tailleX/2, it->y-it->tailleY/2, it->z,
+        it->x+it->tailleX/2, it->y+it->tailleY/2, it->z,
+	it->x-it->tailleX/2, it->y+it->tailleY/2, it->z
+    };
+    GLfloat tex0[] = {
+	0,0,
+	1,0,
+	1,1,
+	0,1
+    };
+
+    glColor4f(it->couleur.r,it->couleur.g,it->couleur.b,it->couleur.a);
+
+    glVertexPointer(3, GL_FLOAT, 0, vtx0);
+    glTexCoordPointer(2, GL_FLOAT, 0, tex0);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+  }
+  glDisableClientState(GL_VERTEX_ARRAY);
+  glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+#endif
 
   for(it=_ListeImageTailleFixe.begin(); it!=_ListeImageTailleFixe.end(); it++)
   {
@@ -1110,12 +1299,14 @@ void MOGL_Afficheur::_AfficherImageOpaqu
       // La texture n'est pas trouée donc on ne fait pas de test alpha
       glDisable(GL_ALPHA_TEST);
     }
+#if !defined(HAVE_GLES)
     glRasterPos3f(it->x, it->y, it->z);
     GLboolean positionValide;
     glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, & positionValide);
         
     if (positionValide)
     {
+#endif
       // On change de viewport
       glMatrixMode(GL_PROJECTION);
       glPushMatrix();
@@ -1123,11 +1314,13 @@ void MOGL_Afficheur::_AfficherImageOpaqu
       gluOrtho2D(0,_Largeur,0,_Hauteur);
 
       float pos[4];
+#if !defined(HAVE_GLES)
       glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
-
-      glBegin(GL_QUADS);
-        
-      glColor4f(it->couleur.r, it->couleur.g, it->couleur.b, it->couleur.a);
+#else
+      pos[0] = it->x;
+      pos[1] = it->y;
+      pos[3] = it->z;
+#endif
 
       float tailleX=_Largeur*it->tailleX / 100.0;
       float tailleY;
@@ -1139,6 +1332,11 @@ void MOGL_Afficheur::_AfficherImageOpaqu
       {
         tailleY=tailleX;
       }
+
+#if !defined(HAVE_GLES)
+      glBegin(GL_QUADS);
+        
+      glColor4f(it->couleur.r, it->couleur.g, it->couleur.b, it->couleur.a);
                 
       glTexCoord2f(0,0);
       glVertex3f(pos[0]-tailleX/2, pos[1]-tailleY/2, 0);
@@ -1153,10 +1351,38 @@ void MOGL_Afficheur::_AfficherImageOpaqu
       glVertex3f(pos[0]-tailleX/2, pos[1]+tailleY/2, 0);
 
       glEnd();
+#else
+      glColor4f(it->couleur.r, it->couleur.g, it->couleur.b, it->couleur.a);
+
+      GLfloat vtx1[] = {
+	pos[0]-tailleX/2, pos[1]-tailleY/2, 0,
+	pos[0]+tailleX/2, pos[1]-tailleY/2, 0,
+	pos[0]+tailleX/2, pos[1]+tailleY/2, 0,
+	pos[0]-tailleX/2, pos[1]+tailleY/2, 0
+      };
+      GLfloat tex1[] = {
+	0,0,
+	1,0,
+	1,1,
+	0,1
+      };
+
+      glEnableClientState(GL_VERTEX_ARRAY);
+      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+      glVertexPointer(3, GL_FLOAT, 0, vtx1);
+      glTexCoordPointer(2, GL_FLOAT, 0, tex1);
+      glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+      glDisableClientState(GL_VERTEX_ARRAY);
+      glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+#endif
       glPopMatrix();
       glMatrixMode(GL_MODELVIEW);
     }
+#if !defined(HAVE_GLES)
   }
+#endif
 }
 
 void MOGL_Afficheur::_AfficherImageNonOpaque()
@@ -1182,6 +1408,7 @@ void MOGL_Afficheur::_AfficherImageNonOp
     }
 
 
+#if !defined(HAVE_GLES)
     glBegin(GL_QUADS);
     for(it=_MultimapImage.begin(); it!=_MultimapImage.end(); it++)
     {
@@ -1222,6 +1449,51 @@ void MOGL_Afficheur::_AfficherImageNonOp
       glVertex3f(it->second.x-it->second.tailleX/2, it->second.y+it->second.tailleY/2, it->second.z);
     }
     glEnd();
+#else
+  for(it=_MultimapImage.begin(); it!=_MultimapImage.end(); it++)
+  {
+        textureCourante=it->second.texture;
+        textureCourante->Selectionner();
+        if (textureCourante->GetTypeTexture()==MOGL_Texture::TEXTURE_TRANSPARENTE)
+        {
+          glDepthMask(1); 
+          glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+          glEnable(GL_BLEND);
+          glDisable(GL_ALPHA_TEST);
+        }
+        else
+        {
+          glDepthMask(0); 
+          glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+          glEnable(GL_BLEND);
+          glDisable(GL_ALPHA_TEST);
+        }
+      GLfloat vtx4[] = {
+        it->second.x-it->second.tailleX/2, it->second.y-it->second.tailleY/2, it->second.z,
+	it->second.x+it->second.tailleX/2, it->second.y-it->second.tailleY/2, it->second.z,
+	it->second.x+it->second.tailleX/2, it->second.y+it->second.tailleY/2, it->second.z,
+	it->second.x-it->second.tailleX/2, it->second.y+it->second.tailleY/2, it->second.z
+      };
+      GLfloat tex4[] = {
+	0,0,
+	1,0,
+	1,1,
+	0,1
+      };
+
+      glColor4f(it->second.couleur.r,it->second.couleur.g,it->second.couleur.b,it->second.couleur.a);
+
+      glEnableClientState(GL_VERTEX_ARRAY);
+      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+      glVertexPointer(3, GL_FLOAT, 0, vtx4);
+      glTexCoordPointer(2, GL_FLOAT, 0, tex4);
+      glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+      glDisableClientState(GL_VERTEX_ARRAY);
+      glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+  }
+#endif
   }
 
   if (_MultimapImageTailleFixe.size()!=0)
@@ -1266,12 +1538,14 @@ void MOGL_Afficheur::_AfficherImageNonOp
       }
 
       const MOGL_Struct_Image & im=it->second;
+#if !defined(HAVE_GLES)
       glRasterPos3f(im.x, im.y, im.z);
       GLboolean positionValide;
       glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, & positionValide);
   
       if (positionValide)
       {
+#endif
         // On change de viewport
         glMatrixMode(GL_PROJECTION);
         glPushMatrix();
@@ -1279,11 +1553,14 @@ void MOGL_Afficheur::_AfficherImageNonOp
         gluOrtho2D(0,_Largeur,0,_Hauteur);
 
         float pos[4];
+#if !defined(HAVE_GLES)
         glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
+#else
+	pos[0]	= im.x;
+	pos[1]	= im.y;
+	pos[2]	= im.z;
+#endif
 
-        glBegin(GL_QUADS);
-  
-        glColor4f(im.couleur.r, im.couleur.g, im.couleur.b, im.couleur.a);
 
         float tailleX=_Largeur*im.tailleX / 100.0;
         float tailleY;
@@ -1296,6 +1573,12 @@ void MOGL_Afficheur::_AfficherImageNonOp
           tailleY=tailleX;
         }
 
+#if !defined(HAVE_GLES)
+
+        glBegin(GL_QUADS);
+  
+        glColor4f(im.couleur.r, im.couleur.g, im.couleur.b, im.couleur.a);
+
         glTexCoord2f(0,0);
         glVertex3f(pos[0]-tailleX/2, pos[1]-tailleY/2, 0);
           
@@ -1309,10 +1592,38 @@ void MOGL_Afficheur::_AfficherImageNonOp
         glVertex3f(pos[0]-tailleX/2, pos[1]+tailleY/2, 0);
 
         glEnd();
+#else
+      glColor4f(im.couleur.r, im.couleur.g, im.couleur.b, im.couleur.a);
+
+      GLfloat vtx2[] = {
+	pos[0]-tailleX/2, pos[1]-tailleY/2, 0,
+	pos[0]+tailleX/2, pos[1]-tailleY/2, 0,
+	pos[0]+tailleX/2, pos[1]+tailleY/2, 0,
+	pos[0]-tailleX/2, pos[1]+tailleY/2, 0
+      };
+      GLfloat tex2[] = {
+	0,0,
+	1,0,
+	1,1,
+	0,1
+      };
+
+      glEnableClientState(GL_VERTEX_ARRAY);
+      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+      glVertexPointer(3, GL_FLOAT, 0, vtx2);
+      glTexCoordPointer(2, GL_FLOAT, 0, tex2);
+      glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+      glDisableClientState(GL_VERTEX_ARRAY);
+      glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+#endif
         glPopMatrix();
         glMatrixMode(GL_MODELVIEW);
       }
+#if !defined(HAVE_GLES)
     }
+#endif
   }
 
   // On est susceptible de l'avoir modifier, alors on le remet.
@@ -1328,17 +1639,30 @@ void MOGL_Afficheur::_AfficherLensFlare(
   MOGL_ItListe_Flare it;
   for(it=_ListeFlare.begin(); it!=_ListeFlare.end(); it++)
   {
+#if !defined(HAVE_GLES)
     glRasterPos3f(it->x, it->y, it->z);
-    GLboolean positionValide;
+#endif
+    GLboolean positionValide = GL_TRUE;
+#if !defined(HAVE_GLES)
     glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, & positionValide);
+#endif
   
     if (positionValide)
     {
       float pos[4];
+#if !defined(HAVE_GLES)
       glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
+#else
+      pos[0] = it->x;
+      pos[1] = it->y;
+      pos[2] = it->z;
+#endif
 
-      float valDepthBuffer;
+      float valDepthBuffer = 1.0f;
+#if !defined(HAVE_GLES)
       glReadPixels(static_cast<int>(pos[0]), static_cast<int>(pos[1]), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &valDepthBuffer);
+#endif
+
       if (valDepthBuffer>pos[2])
       {
         // On paramètre la texture
@@ -1382,18 +1706,20 @@ void MOGL_Afficheur::_AfficherLensFlare(
         gluOrtho2D(0,_Largeur,0,_Hauteur);
 
         //float pos[4];
+#if !defined(HAVE_GLES)
         glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
+#endif
 
         float x=pos[0]*it->position+_Largeur/2;
         float y=pos[1]*it->position+_Hauteur/2;
-          
+        /** @todo Spécifier la taille de manière à être conforme à la caméra */
+        float taille=_Largeur*it->taille / 100.0;
 
+#if !defined(HAVE_GLES)
         glBegin(GL_QUADS);
   
         glColor4f(it->couleur.r, it->couleur.g, it->couleur.b, it->couleur.a);
 
-        float taille=_Largeur*it->taille / 100.0;
-        /** @todo Spécifier la taille de manière à être conforme à la caméra */
 
         glTexCoord2f(0,0);
         glVertex3f(x-taille/2, y-taille/2, 0);
@@ -1408,6 +1734,32 @@ void MOGL_Afficheur::_AfficherLensFlare(
         glVertex3f(x-taille/2, y+taille/2, 0);
 
         glEnd();
+#else
+
+	GLfloat vtx3[] = {
+		x-taille/2, y-taille/2, 0,
+		x+taille/2, y-taille/2, 0,
+		x+taille/2, y+taille/2, 0,
+		x-taille/2, y+taille/2, 0
+	};
+	GLfloat tex3[] = {
+		0,0,
+		1,0,
+		1,1,
+		0,1
+	};
+
+      glEnableClientState(GL_VERTEX_ARRAY);
+      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+      glColor4f(it->couleur.r, it->couleur.g, it->couleur.b, it->couleur.a);
+      glVertexPointer(3, GL_FLOAT, 0, vtx3);
+      glTexCoordPointer(2, GL_FLOAT, 0, tex3);
+      glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+      glDisableClientState(GL_VERTEX_ARRAY);
+      glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+#endif
         glPopMatrix();
         glMatrixMode(GL_MODELVIEW);
       }
@@ -1416,17 +1768,29 @@ void MOGL_Afficheur::_AfficherLensFlare(
   
   for(it=_ListeFlareTailleFixe.begin(); it!=_ListeFlareTailleFixe.end(); it++)
   {
+#if !defined(HAVE_GLES)
     glRasterPos3f(it->x, it->y, it->z);
     GLboolean positionValide;
     glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, & positionValide);
-  
+
     if (positionValide)
     {
+#endif
       float pos[4];
+#if !defined(HAVE_GLES)
       glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
+#else
+      pos[0] = it->x;
+      pos[1] = it->y;
+      pos[2] = it->z;
+#endif
 
-      float valDepthBuffer;
+      float valDepthBuffer = 1.0f;
+
+
+#if !defined(HAVE_GLES)
       glReadPixels(static_cast<int>(pos[0]), static_cast<int>(pos[1]), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &valDepthBuffer);
+#endif
       if (valDepthBuffer>pos[2])
       {
                 
@@ -1473,12 +1837,13 @@ void MOGL_Afficheur::_AfficherLensFlare(
         float y=(pos[1]-_Hauteur/2)*it->position+_Hauteur/2;
           
 
+        float taille=_Largeur*it->taille / 100.0;
+
+#if !defined(HAVE_GLES)
         glBegin(GL_QUADS);
   
         glColor4f(it->couleur.r, it->couleur.g, it->couleur.b, it->couleur.a);
 
-        float taille=_Largeur*it->taille / 100.0;
-
         glTexCoord2f(0,0);
         glVertex3f(x-taille/2, y-taille/2, 0);
           
@@ -1492,9 +1857,36 @@ void MOGL_Afficheur::_AfficherLensFlare(
         glVertex3f(x-taille/2, y+taille/2, 0);
 
         glEnd();
+#else
+	GLfloat vtx4[] = {
+		x-taille/2, y-taille/2, 0,
+		x+taille/2, y-taille/2, 0,
+		x+taille/2, y+taille/2, 0,
+		x-taille/2, y+taille/2, 0
+	};
+	GLfloat tex4[] = {
+		0,0,
+		1,0,
+		1,1,
+		0,1
+	};
+
+      glEnableClientState(GL_VERTEX_ARRAY);
+      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+      glColor4f(it->couleur.r, it->couleur.g, it->couleur.b, it->couleur.a);
+      glVertexPointer(3, GL_FLOAT, 0, vtx4);
+      glTexCoordPointer(2, GL_FLOAT, 0, tex4);
+      glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+      glDisableClientState(GL_VERTEX_ARRAY);
+      glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+#endif
         glPopMatrix();
         glMatrixMode(GL_MODELVIEW);
+#if !defined(HAVE_GLES)
       }
+#endif
     }
   }
   // On est susceptible de l'avoir modifier, alors on le remet.
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Bouton.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Bouton.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Bouton.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Bouton.cpp	2011-02-09 19:11:49.000000000 -0500
@@ -56,6 +56,10 @@ void MOGL_Bouton::ClavierUp(SDL_keysym *
 {
   switch (key->sym)
   {
+#ifdef PANDORA
+    case SDLK_HOME:
+    case SDLK_PAGEDOWN:
+#endif
     case SDLK_KP_ENTER :
     case SDLK_RETURN:
     {
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Camera.h briquolo-0.5.7-pandora/src//MOGL/MOGL_Camera.h
--- briquolo-0.5.7/src//MOGL/MOGL_Camera.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Camera.h	2011-02-08 20:14:09.000000000 -0500
@@ -26,7 +26,11 @@
 #include <windows.h>
 #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include <GL/glu.h>
 
 #include "MOGL_MatriceTransformation.h"
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Choix.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Choix.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Choix.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Choix.cpp	2011-02-09 19:12:03.000000000 -0500
@@ -94,6 +94,10 @@ void MOGL_Choix::ClavierUp(SDL_keysym *
       ChangementElement.Emettre(_IndiceCourant);
       break;
     }
+#ifdef PANDORA
+    case SDLK_HOME:
+    case SDLK_PAGEDOWN:
+#endif
     case SDLK_KP_ENTER :
     case SDLK_RETURN:
     {
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_EnsembleObjet.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_EnsembleObjet.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_EnsembleObjet.cpp	2008-03-24 09:12:36.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_EnsembleObjet.cpp	2011-02-09 19:29:47.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Darius Hardy <darius@sephs.no-ip.info>
  *
  *  This file is part of BRIQUOLO
  *
@@ -25,6 +26,8 @@
 #include "MOGL_Peau.h"
 //#include
 #include <stdio.h>
+#include <string.h>
+
 
 //#include <mmsystem.h>
 
@@ -47,6 +50,10 @@ bool MOGL_EnsembleObjet::Charger(char *
   MOGL_Noeud * ObjetCourant;
   string NomCourant;
   unsigned int NiveauCourant=0;
+#if defined(HAVE_GLES)
+  float u_scale = 1.0f, v_scale = 1.0f;
+#endif
+
 
   vector <MOGL_Noeud *> TabObjet;
   _Noeud=new MOGL_Noeud;
@@ -179,6 +186,12 @@ bool MOGL_EnsembleObjet::Charger(char *
           strncpy(temp,chaine+i,j-i);
           temp[j-i]=0;
           Texture=p_GM.GetTexture(temp);
+#if defined(HAVE_GLES)
+          if (Texture) {
+            u_scale = Texture->_RecX;
+            v_scale = Texture->_RecY;
+          }
+#endif
 
         }
 
@@ -227,8 +240,14 @@ bool MOGL_EnsembleObjet::Charger(char *
           Pt[index_point].yn=yn;
           Pt[index_point].zn=zn;
 
+#if !defined(HAVE_GLES)
           Pt[index_point].xt=u;
           Pt[index_point].yt=v;
+#else
+          Pt[index_point].xt=u * u_scale;
+          Pt[index_point].yt=v * v_scale;
+#endif
+
 
           index_point++;
         }
@@ -257,6 +276,9 @@ bool MOGL_EnsembleObjet::ChargerArmature
   bool debut=true;
   bool PremiereFace=true;
   unsigned int PtNum[3];
+#if defined(HAVE_GLES)
+  float u_scale = 1.0f, v_scale = 1.0f;
+#endif
 
   MOGL_Texture * Texture=NULL;
   MOGL_Noeud * ObjetCourant;
@@ -496,6 +518,12 @@ bool MOGL_EnsembleObjet::ChargerArmature
           {
                 cerr<<"Texture not found"<<endl;
           }
+#if defined(HAVE_GLES)
+          else {
+            u_scale = Texture->_RecX;
+            v_scale = Texture->_RecY;
+          }
+#endif
           Triangle.SetTexture(Texture);
         }
 
@@ -546,8 +574,14 @@ bool MOGL_EnsembleObjet::ChargerArmature
           PtNum[index_point]=indicePoint-1;
 
           MOGL_Struct_PointTexture PtText;
+#if !defined(HAVE_GLES)
           PtText.xt=u;
           PtText.yt=v;
+#else
+          PtText.xt=u * u_scale;
+          PtText.yt=v * v_scale;
+#endif
+
           Triangle.SetPointTexture(index_point, PtText);
 
           index_point++;
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_EnsembleObjet.h briquolo-0.5.7-pandora/src//MOGL/MOGL_EnsembleObjet.h
--- briquolo-0.5.7/src//MOGL/MOGL_EnsembleObjet.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_EnsembleObjet.h	2011-02-08 20:14:15.000000000 -0500
@@ -37,7 +37,11 @@
         #include <windows.h>
         #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include "MOGL_GestionnaireTexture.h"
 
 using namespace std;
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Fenetre.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Fenetre.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Fenetre.cpp	2008-03-24 09:23:07.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Fenetre.cpp	2011-02-09 19:30:35.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *	Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
  *
  *	This file is part of BRIQUOLO
  *
@@ -29,6 +30,10 @@
 #include <unistd.h>
 #endif
 
+#ifdef HAVE_GLES
+#include "eglport.h"
+#endif
+
 MOGL_Fenetre::MOGL_Fenetre(const char * p_Titre):_ResolutionX(640), _ResolutionY(480), _NbBitParPixel(16), _FinBoucle(false),
                                                  _Fullscreen(false),_GrabCurseur(false),
                                                  _RepetitionDelai(SDL_DEFAULT_REPEAT_DELAY), _RepetitionIntervalle(SDL_DEFAULT_REPEAT_INTERVAL),
@@ -44,6 +49,10 @@ MOGL_Fenetre::MOGL_Fenetre(const char *
 		strcpy(_Titre,p_Titre);
 	}
 	SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_JOYSTICK);
+#if defined(HAVE_GLES)
+	if (!EGL_Open())
+		exit(1);
+#endif
 	SDL_EnableUNICODE(1);
 	_NombreJoysticks=SDL_NumJoysticks();
 	_Joysticks=new SDL_Joystick * [_NombreJoysticks];
@@ -60,7 +69,11 @@ MOGL_Fenetre::MOGL_Fenetre(const char *
 
 	// On récupère les résolutions
 	SDL_Rect **modes;
+#if defined(HAVE_GLES)
+	modes = SDL_ListModes(NULL, SDL_SWSURFACE | SDL_FULLSCREEN);
+#else
 	modes = SDL_ListModes(NULL, SDL_OPENGL | SDL_FULLSCREEN);
+#endif
 	cout << "SDL tells that the following fullscreen resolutions are available:" << endl;
 	for(unsigned int i = 0; modes[i]; i++)
 	{
@@ -75,7 +88,11 @@ MOGL_Fenetre::MOGL_Fenetre(const char *
 	{
 		cout << "There is no fullscreen resolution! So we search non-fullscreen resolution." << endl;
 		cout << "SDL tell us that the following non-fullscreen resolution are available:" << endl;
+#if defined(HAVE_GLES)
+		modes = SDL_ListModes(NULL, SDL_SWSURFACE);
+#else
 		modes = SDL_ListModes(NULL, SDL_OPENGL);
+#endif
 		for(unsigned int i = 0; modes[i]; i++)
 		{
 			cout << modes[i]->w << "x" << modes[i]->h << " ";
@@ -85,11 +102,23 @@ MOGL_Fenetre::MOGL_Fenetre(const char *
 		}
 		cout << endl;
 	}
+#ifdef PANDORA
+	Uint8 hiddenCursorData = 0;
+	hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0);
+	SDL_SetCursor(hiddenCursor);
+	SDL_ShowCursor(1);
+#endif
 }
 
 
 MOGL_Fenetre::~MOGL_Fenetre()
 {
+#if defined(HAVE_GLES)
+    EGL_Destroy();
+#endif
+//#ifdef PANDORA
+//    SDL_FreeCursor(hiddenCursor);
+//#endif
     SDL_Quit();
     delete [] _Titre;
     for(unsigned int i=0; i<_NombreJoysticks; i++)
@@ -112,6 +141,10 @@ bool MOGL_Fenetre::Initialiser()
 	const SDL_VideoInfo* info;
 	int flags = 0;
 
+#if defined(HAVE_GLES)
+	//flags = SDL_SWSURFACE | SDL_FULLSCREEN;
+	flags = SDL_SWSURFACE | SDL_RESIZABLE;
+#else
 	if (_Fullscreen)
 	{
 		cout << "Fullscreen is true" << endl;
@@ -122,6 +155,7 @@ bool MOGL_Fenetre::Initialiser()
 		cout << "Fullscreen is false" << endl;
 		flags = SDL_OPENGL | SDL_RESIZABLE;
 	}
+#endif
 
 	// On regarde si notre résolution est bien disponible
 	cout << "Trying resolution from configuration file..." << endl;
@@ -189,6 +223,10 @@ bool MOGL_Fenetre::Initialiser()
 		cerr<<"Video Init error: can't create the window!"<<endl;
 		return false;
 	}
+#if defined(HAVE_GLES)
+	EGL_Init();
+#endif
+
 
 	ChangementMode.Emettre(_ResolutionX, _ResolutionY, _NbBitParPixel);
 
@@ -203,7 +241,11 @@ bool MOGL_Fenetre::Initialiser()
 	glClearColor(0.25,0.25,0.25,0.25);
 	glClear(GL_COLOR_BUFFER_BIT);
 
+#if !defined(HAVE_GLES)
 	SDL_GL_SwapBuffers( );
+#else
+	EGL_SwapBuffers();
+#endif
 
 	_ExisteFenetre=true;
 	return true;
@@ -250,11 +292,13 @@ SDL_Surface * MOGL_Fenetre::_CreerFenetr
             break;
         }
     }
+#if !defined(HAVE_GLES)
     SDL_GL_SetAttribute( SDL_GL_RED_SIZE, rMask );
     SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, gMask );
     SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, bMask );
     SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, p_Bpp );
     SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+#endif
 
     cout<<"  Trying attributes and BPP: rMask="<<rMask<<" gMask="<<gMask<<" bMask="<<bMask<<" BPP="<<p_Bpp;
     SDL_Surface * surf = SDL_SetVideoMode( _ResolutionX, _ResolutionY, p_Bpp, p_Flags );
@@ -321,7 +365,11 @@ bool MOGL_Fenetre::LancerBoucle()
             }
         }
         // On fait le switch des buffers
-        SDL_GL_SwapBuffers( );
+#if !defined(HAVE_GLES)
+	SDL_GL_SwapBuffers( );
+#else
+	EGL_SwapBuffers();
+#endif
     }
     Destruction.Emettre();
     return true;																	// Success
@@ -338,6 +386,10 @@ bool MOGL_Fenetre::SetMode(int p_Resolut
 
 bool MOGL_Fenetre::SetMode(int p_ResolutionX, int p_ResolutionY, bool p_Fullscreen)
 {
+#if defined(PANDORA)
+	// Don't try altering SDL video mode on the Pandora - it locks up
+	return true;
+#endif
 	_ResolutionX=p_ResolutionX;
 	_ResolutionY=p_ResolutionY;
 	_Fullscreen=p_Fullscreen;
@@ -349,12 +401,20 @@ bool MOGL_Fenetre::SetMode(int p_Resolut
         if (_Fullscreen)
         {
             cout << "Fullscreen is true" << endl;
+#if !defined(HAVE_GLES)
             flags = SDL_OPENGL | SDL_FULLSCREEN;
+#else
+            flags = SDL_SWSURFACE | SDL_FULLSCREEN;
+#endif
         }
         else
         {
             cout << "Fullscreen is false" << endl;
+#if !defined(HAVE_GLES)
             flags = SDL_OPENGL | SDL_RESIZABLE;
+#else
+            flags = SDL_SWSURFACE | SDL_RESIZABLE;
+#endif
         }
 #ifdef WIN32
 		// Sous windows le changement de résolution semble très alléatoire...
@@ -503,7 +563,11 @@ bool MOGL_Fenetre::_InitGL()
 
     //glShadeModel(GL_SMOOTH);
     glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+#if !defined(HAVE_GLES)
     glClearDepth(1.0f);
+#else
+    glClearDepthf(1.0f);
+#endif
     glClearColor(0.25f,0.25f,0.25f,1.0f);
 
 
@@ -533,7 +597,11 @@ void MOGL_Fenetre::_ManualResize(int p_R
     const SDL_VideoInfo* info;
     int flags = 0;
 
+#if defined(HAVE_GLES)
+    flags = SDL_SWSURFACE | SDL_RESIZABLE;
+#else
     flags = SDL_OPENGL | SDL_RESIZABLE;
+#endif
 
     if (_ExisteFenetre)
     {
@@ -710,6 +778,7 @@ bool MOGL_Fenetre::RetirerInterface(MOGL
 void MOGL_Fenetre::SetGrabCurseur(bool p_Val)
 {
     _GrabCurseur=p_Val;
+#if !defined(PANDORA)
     if (_GrabCurseur)
     {
         SDL_WM_GrabInput(SDL_GRAB_ON);
@@ -718,11 +787,13 @@ void MOGL_Fenetre::SetGrabCurseur(bool p
     {
         SDL_WM_GrabInput(SDL_GRAB_OFF);
     }
+#endif
 }
 
 void MOGL_Fenetre::SetCacherCurseur(bool p_Val)
 {
     _CacheSouris=p_Val;
+#if !defined(PANDORA)
     if (_CacheSouris)
     {
         SDL_ShowCursor(0);
@@ -731,6 +802,7 @@ void MOGL_Fenetre::SetCacherCurseur(bool
     {
         SDL_ShowCursor(1);
     }
+#endif
 }
 
 
@@ -755,8 +827,11 @@ bool MOGL_Fenetre::ScreenshotBMP(char *
     {
         memcpy((char*)temp->pixels + 3 * _ResolutionX * y, (char *)image->pixels + 3 * _ResolutionX*(_ResolutionY - y), 3*_ResolutionX);
     }
-    memcpy(image->pixels,temp->pixels,_ResolutionX * _ResolutionY * 3);
-    int err=SDL_SaveBMP(image, p_NomFichier);
+// Why do this?
+//    memcpy(image->pixels,temp->pixels,_ResolutionX * _ResolutionY * 3);
+    int err=SDL_SaveBMP(temp, p_NomFichier);
+// Free temp too!
+    SDL_FreeSurface(temp);
     SDL_FreeSurface(image);
     if (err==0)
     {
@@ -869,13 +944,14 @@ bool MOGL_Fenetre::ScreenshotPrefixBMP(c
     image = SDL_CreateRGBSurface(SDL_SWSURFACE, _ResolutionX, _ResolutionY, 24, 0x0000FF, 0x00FF00, 0xFF0000, 0);
     temp = SDL_CreateRGBSurface(SDL_SWSURFACE, _ResolutionX, _ResolutionY, 24, 0x0000FF, 0x00FF00, 0xFF0000, 0);
 
-    glReadPixels(1, 1, _ResolutionX, _ResolutionY, GL_RGB, GL_UNSIGNED_BYTE, image->pixels);
+    glReadPixels(0, 0, _ResolutionX, _ResolutionY, GL_RGB, GL_UNSIGNED_BYTE, image->pixels);
     for (int y = 0; y < _ResolutionY; y++)
     {
         memcpy((char*)temp->pixels + 3 * _ResolutionX * y, (char *)image->pixels + 3 * _ResolutionX*(_ResolutionY - y), 3*_ResolutionX);
     }
-    memcpy(image->pixels,temp->pixels,_ResolutionX * _ResolutionY * 3);
-    int res=SDL_SaveBMP(image, nomFichier.c_str());
+//    memcpy(image->pixels,temp->pixels,_ResolutionX * _ResolutionY * 3);
+    int res=SDL_SaveBMP(temp, nomFichier.c_str());
+    SDL_FreeSurface(temp);
     SDL_FreeSurface(image);
     if (res==0)
     {
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Fenetre.h briquolo-0.5.7-pandora/src//MOGL/MOGL_Fenetre.h
--- briquolo-0.5.7/src//MOGL/MOGL_Fenetre.h	2008-03-22 05:57:47.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Fenetre.h	2011-02-08 20:47:38.000000000 -0500
@@ -28,7 +28,11 @@
 #include <windowsx.h>
 #endif
 
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include <GL/glu.h>
 #include <SDL/SDL.h>
 #include <iostream>
@@ -102,6 +106,9 @@ class MOGL_Fenetre
     SDL_Joystick ** _Joysticks;
     bool _bManualResize;
 
+#ifdef PANDORA
+    SDL_Cursor *hiddenCursor;
+#endif
     // Les Signaux
   public:
     MOGL_Signal0 Idle;
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_FenetreKit.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_FenetreKit.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_FenetreKit.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_FenetreKit.cpp	2011-02-09 19:12:30.000000000 -0500
@@ -29,7 +29,7 @@ MOGL_FenetreKit::MOGL_FenetreKit(char *
 bool MOGL_FenetreKit::Initialiser()
 {
   _Camera.SetClipping(1,1000);
-  _Fenetre.SetMode(800,600,16);
+  _Fenetre.SetMode(640,480,16);
   _Fenetre.SetFullscreen(false);
   if (!_Fenetre.Initialiser())
   {
@@ -114,6 +114,9 @@ void MOGL_FenetreKit::Clavier(SDL_keysym
       _Camera.DroiteVitesse(20);
       break;
     }
+#ifdef PANDORA
+    case SDLK_LALT:
+#endif
     case SDLK_ESCAPE:
     {
       _Fenetre.Arreter();
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_GenerateurParticule.h briquolo-0.5.7-pandora/src//MOGL/MOGL_GenerateurParticule.h
--- briquolo-0.5.7/src//MOGL/MOGL_GenerateurParticule.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_GenerateurParticule.h	2011-02-08 20:16:27.000000000 -0500
@@ -31,7 +31,11 @@
         #include <windows.h>
         #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include "MOGL_Particule.h"
 #include "MOGL_Structure.h"
 #include "MOGL_Noeud.h"
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_GestionnaireObjet.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_GestionnaireObjet.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_GestionnaireObjet.cpp	2008-03-24 08:56:13.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_GestionnaireObjet.cpp	2011-02-09 19:30:45.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Darius Hardy <darius@sephs.no-ip.info>
  *
  *  This file is part of BRIQUOLO
  *
@@ -20,6 +21,7 @@
  *
  *****************************************************************************/
 #include "../I18n.h"
+#include <string.h>
 #include "MOGL_GestionnaireObjet.h"
 
 bool MOGL_GestionnaireObjet::ChargerObjetASCTriangle(const char * p_NomFichier, const MOGL_GestionnaireTexture & p_GM,
@@ -32,6 +34,9 @@ bool MOGL_GestionnaireObjet::ChargerObje
   int index_point=0;
   MOGL_Struct_Point Pt[3];
   MOGL_Texture * Texture=NULL;
+#if defined(HAVE_GLES)
+  float u_scale = 1.0f, v_scale = 1.0f;
+#endif
 
   ifstream Fichier(p_NomFichier);
 
@@ -69,7 +74,12 @@ bool MOGL_GestionnaireObjet::ChargerObje
       {
         cerr<< "Texture" << " \""<<temp<<"\" "<< "not found"<<endl;
       }
-
+#if defined(HAVE_GLES)
+      else {
+        u_scale = Texture->_RecX;
+        v_scale = Texture->_RecY;
+      }
+#endif
     }
 
     if (!strncmp(chaine,"Vertex",6))
@@ -119,8 +129,14 @@ bool MOGL_GestionnaireObjet::ChargerObje
       Pt[index_point].yn=yn/norm;
       Pt[index_point].zn=zn/norm;
 
+#if !defined(HAVE_GLES)
       Pt[index_point].xt=u;
       Pt[index_point].yt=v;
+#else
+      Pt[index_point].xt=u * u_scale;
+      Pt[index_point].yt=v * v_scale;
+#endif
+
 
       index_point++;
     }
@@ -141,7 +157,9 @@ bool MOGL_GestionnaireObjet::ChargerObje
         MOGL_Struct_Point Point;
         MOGL_Liste_Point ListePoint;
         MOGL_Texture * Texture=NULL;
-
+#if defined(HAVE_GLES)
+        float u_scale = 1.0f, v_scale = 1.0f;
+#endif
         int NbTotal=0;
 
         ifstream Fichier(p_NomFichier);
@@ -224,6 +242,12 @@ bool MOGL_GestionnaireObjet::ChargerObje
                         strncpy(temp,chaine+i,j-i);
                         temp[j-i]=0;
                         Texture=p_GM.GetTexture(temp);
+#if defined(PANDORA)
+                        if (Texture) {
+                          u_scale = Texture->_RecX;
+                          v_scale = Texture->_RecY;
+                        }
+#endif
 
                 }
 
@@ -273,8 +297,14 @@ bool MOGL_GestionnaireObjet::ChargerObje
                         Point.yn=yn;
                         Point.zn=zn;
 
+#if !defined(HAVE_GLES)
                         Point.xt=u;
                         Point.yt=v;
+#else
+                        Point.xt=u * u_scale;
+                        Point.yt=v * v_scale;
+#endif
+
 
                         ListePoint.push_back(Point);
                 }
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Image.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Image.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Image.cpp	2006-03-07 15:53:33.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Image.cpp	2011-01-29 01:58:13.000000000 -0500
@@ -22,6 +22,7 @@
 #include <png.h>
 #include "MOGL_Image.h"
 #include <fstream>
+#include <iostream>
 
 using namespace std;
 
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_ImageFacade.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_ImageFacade.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_ImageFacade.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_ImageFacade.cpp	2011-02-09 19:28:08.000000000 -0500
@@ -1,6 +1,8 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
+ *  Copyright (C) 2011 Darius Hardy <darius@sephs.no-ip.info>
  *
  *  This file is part of BRIQUOLO
  *
@@ -24,6 +26,10 @@
 #include <cmath>
 #include <iostream>
 
+#ifndef GL_CLAMP
+#define GL_CLAMP GL_CLAMP_TO_EDGE
+#endif
+
 MOGL_ImageFacade::MOGL_ImageFacade(bool p_AutoriserTrou)
   : MOGL_ElementFacade(), MOGL_Image(p_AutoriserTrou), _Initialise(false), _Texture(true), _Nom(0)
 {
@@ -66,33 +72,56 @@ void MOGL_ImageFacade::Afficher()
       bool b2=_Puissance2(_TailleY, nouveauTailleY);
       if (!b1 || !b2)
       {
+#if !defined(HAVE_GLES)
         MOGL_Struct_Couleur * imageNouveau=new MOGL_Struct_Couleur[nouveauTailleX*nouveauTailleY];
+#else
+        GLuint *imageNouveau=new GLuint[nouveauTailleX*nouveauTailleY];
+#endif
         for(unsigned int y=0; y<nouveauTailleY; y++)
         {
           for(unsigned int x=0; x<nouveauTailleX; x++)
           {
             if (x<_TailleX && y<_TailleY)
             {
+#if !defined(HAVE_GLES)
               imageNouveau[y*nouveauTailleX+x]=_Image[y*_TailleX+x];
+#else
+              MOGL_Struct_Couleur im = _Image[y*_TailleX+x];
+              GLuint pix = min(int(im.a * 255.0f), 255);
+              pix = (pix << 8) + min(int(im.b * 255.0f), 0xff);
+              pix = (pix << 8) + min(int(im.g * 255.0f), 0xff);
+              pix = (pix << 8) + min(int(im.r * 255.0f), 0xff);
+              imageNouveau[y*nouveauTailleX+x] = pix;
+#endif
             }
             else
             {
+#if !defined(HAVE_GLES)
               MOGL_Struct_Couleur & coul=imageNouveau[y*nouveauTailleX+x];
               coul.r=0;
               coul.g=0;
               coul.b=0;
               coul.a=1;
+#else
+              imageNouveau[y*nouveauTailleX+x] = 0xff000000;
+#endif
             }
           }
         }
         _RecX=static_cast<float>(_TailleX)/nouveauTailleX;
         _RecY=static_cast<float>(_TailleY)/nouveauTailleY;
-        glTexImage2D(GL_TEXTURE_2D,0,4,nouveauTailleX,nouveauTailleY,0,GL_RGBA,GL_FLOAT,imageNouveau);
+        //glTexImage2D(GL_TEXTURE_2D,0,4,nouveauTailleX,nouveauTailleY,0,GL_RGBA,GL_FLOAT,imageNouveau);
+#if !defined(HAVE_GLES)
+        glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,nouveauTailleX,nouveauTailleY,0,GL_RGBA,GL_FLOAT,imageNouveau);
+#else
+        glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,nouveauTailleX,nouveauTailleY,0,GL_RGBA,GL_UNSIGNED_BYTE,imageNouveau);
+#endif
       }
       else
       {
         _RecX=_RecY=1;
-        glTexImage2D(GL_TEXTURE_2D,0,4,_TailleX,_TailleY,0,GL_RGBA,GL_FLOAT,_Image);
+        //glTexImage2D(GL_TEXTURE_2D,0,4,_TailleX,_TailleY,0,GL_RGBA,GL_FLOAT,_Image);
+        glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,_TailleX,_TailleY,0,GL_RGBA,GL_FLOAT,_Image);
       }
 
       glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
@@ -116,6 +145,7 @@ void MOGL_ImageFacade::Afficher()
     glEnable(GL_TEXTURE_2D);
     glBindTexture(GL_TEXTURE_2D, _Nom);
     glColor4f(1,1,1,1);
+#if !defined(HAVE_GLES)
     glBegin(GL_QUADS);
     glTexCoord2f(0,_RecY);
     glVertex2f(_PositionX, _PositionY);
@@ -126,12 +156,38 @@ void MOGL_ImageFacade::Afficher()
     glTexCoord2f(_RecX,_RecY);
     glVertex2f(_PositionX+_TailleX, _PositionY);
     glEnd();
+#else
+    GLfloat vtx[] = {
+	_PositionX, _PositionY,
+	_PositionX, _PositionY+_TailleY,
+	_PositionX+_TailleX, _PositionY+_TailleY,
+	_PositionX+_TailleX, _PositionY
+    };
+    GLfloat tex[] = {
+	0,_RecY,
+	0,0,
+	_RecX,0,
+	_RecX,_RecY
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+    glVertexPointer(2, GL_FLOAT, 0, vtx);
+    glTexCoordPointer(2, GL_FLOAT, 0, tex);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+    glDisableClientState(GL_VERTEX_ARRAY);
+    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+#endif
   }
   else
   {
     glDisable(GL_TEXTURE_2D);
+#if !defined(HAVE_GLES)
     glRasterPos2i(_PositionX, _PositionY+_TailleY);
     glDrawPixels(_TailleX, _TailleY, GL_RGBA, GL_FLOAT, _Image);
+#endif
   }
 }
 
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_LensFlareFond.h briquolo-0.5.7-pandora/src//MOGL/MOGL_LensFlareFond.h
--- briquolo-0.5.7/src//MOGL/MOGL_LensFlareFond.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_LensFlareFond.h	2011-02-08 20:16:38.000000000 -0500
@@ -26,7 +26,11 @@
         #include <windows.h>
         #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include <GL/glu.h>
 
 #include "MOGL_LensFlare.h"
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_LensFlare.h briquolo-0.5.7-pandora/src//MOGL/MOGL_LensFlare.h
--- briquolo-0.5.7/src//MOGL/MOGL_LensFlare.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_LensFlare.h	2011-02-08 20:16:43.000000000 -0500
@@ -26,7 +26,11 @@
         #include <windows.h>
         #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include <GL/glu.h>
 
 #include "MOGL_ElementArbre.h"
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_LensFlareNormal.h briquolo-0.5.7-pandora/src//MOGL/MOGL_LensFlareNormal.h
--- briquolo-0.5.7/src//MOGL/MOGL_LensFlareNormal.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_LensFlareNormal.h	2011-02-08 20:16:58.000000000 -0500
@@ -26,7 +26,11 @@
         #include <windows.h>
         #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include <GL/glu.h>
 
 #include "MOGL_LensFlare.h"
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_MatriceTransformation.h briquolo-0.5.7-pandora/src//MOGL/MOGL_MatriceTransformation.h
--- briquolo-0.5.7/src//MOGL/MOGL_MatriceTransformation.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_MatriceTransformation.h	2011-02-08 20:17:03.000000000 -0500
@@ -28,7 +28,11 @@
         #include <windows.h>
         #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include "MOGL_Structure.h"
 
 /**
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_NoeudOpenGL.h briquolo-0.5.7-pandora/src//MOGL/MOGL_NoeudOpenGL.h
--- briquolo-0.5.7/src//MOGL/MOGL_NoeudOpenGL.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_NoeudOpenGL.h	2011-02-08 20:17:08.000000000 -0500
@@ -23,7 +23,11 @@
 #define MOGL_NOEUDOPENGL
 
 #include "MOGL_Noeud.h"
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include <GL/glu.h>
 
 class MOGL_NoeudOpenGL: public MOGL_Noeud
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Objet.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Objet.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Objet.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Objet.cpp	2011-01-27 19:13:48.000000000 -0500
@@ -20,6 +20,7 @@
  *
  *****************************************************************************/
 #include "MOGL_Objet.h"
+#include <stdlib.h>
 
 //MOGL_Objet::MOGL_Objet(): MOGL_ObjetAbstrait(), MOGL_ElementArbre()
 MOGL_Objet::MOGL_Objet(): MOGL_Noeud(), _ModifieTriangle(true), _ModifieStrip(true),
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Omni.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Omni.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Omni.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Omni.cpp	2011-02-09 19:31:11.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
  *
  *  This file is part of BRIQUOLO
  *
@@ -44,8 +45,10 @@ void MOGL_Omni::TnL(MOGL_Afficheur * p_A
 
   // **** Réglage de la lumière ****
   int Pos[4]={0,0,0,1};
+#if !defined(HAVE_GLES)
   glLightiv(_NumLight,GL_POSITION,Pos);
   glLightf(_NumLight,GL_SPOT_CUTOFF,180);
+#endif
 
   MOGL_ItSet_ElementArbre it;
   for(it=_SetElement.begin();it!=_SetElement.end();it++)
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Panneau.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Panneau.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Panneau.cpp	2007-03-22 10:05:14.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Panneau.cpp	2011-02-09 19:31:36.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
  *
  *  This file is part of BRIQUOLO
  *
@@ -154,12 +155,26 @@ void MOGL_Panneau::Afficher()
 
       // On dessine le cadre
       glColor4f(_CouleurFond.r, _CouleurFond.g, _CouleurFond.b, _CouleurFond.a);
+#if !defined(HAVE_GLES)
       glBegin(GL_QUADS);
       glVertex2f(0,0);
       glVertex2f(0,_HauteurPanneau);
       glVertex2f(_LargeurPanneau,_HauteurPanneau);
       glVertex2f(_LargeurPanneau,0);
       glEnd();
+#else
+      GLfloat quad[] = {
+	0,0,
+	0,_HauteurPanneau,
+	_LargeurPanneau,_HauteurPanneau,
+	_LargeurPanneau,0
+      };
+
+      glEnableClientState(GL_VERTEX_ARRAY);
+      glVertexPointer(2, GL_FLOAT, 0, quad);
+      glDrawArrays(GL_TRIANGLE_FAN,0,4);
+      glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
       int marge=10;
 
@@ -204,6 +219,9 @@ void MOGL_Panneau::ClavierUp(SDL_keysym
         {
             switch (key->sym)
             {
+#ifdef PANDORA
+		case SDLK_LALT:
+#endif
                 case SDLK_ESCAPE:
                 {
                     if (_UtiliserEscape)
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Peau.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Peau.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Peau.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Peau.cpp	2011-01-27 19:20:27.000000000 -0500
@@ -20,6 +20,7 @@
  *
  *****************************************************************************/
 #include "MOGL_Peau.h"
+#include <stdlib.h>
 
 MOGL_Peau::MOGL_Peau(): MOGL_Noeud(), _ModifieTriangle(true)
 {
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_PoliceBitmap.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_PoliceBitmap.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_PoliceBitmap.cpp	2008-03-24 08:25:15.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_PoliceBitmap.cpp	2011-02-09 19:28:34.000000000 -0500
@@ -1,6 +1,8 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
+ *  Copyright (C) 2011 Darius Hardy <darius@sephs.no-ip.info>
  *
  *  This file is part of BRIQUOLO
  *
@@ -60,7 +62,11 @@ bool MOGL_PoliceBitmap::Charger(const ch
     _TailleX = _ReadUnsignedInt(file);
     _TailleY = _ReadUnsignedInt(file);
 
+#if !defined(HAVE_GLES)
     _Image=new MOGL_Struct_Couleur[_TailleX*_TailleY];
+#else
+    GLuint *_pImage=new GLuint[_TailleX*_TailleY];
+#endif
     MOGL_Struct_Couleur coul;
     for(unsigned int y=0; y<_TailleY; y++)
     {
@@ -78,7 +84,11 @@ bool MOGL_PoliceBitmap::Charger(const ch
             coul.g=1;
             coul.b=1;
 
+#if !defined(HAVE_GLES)
             _Image[y*_TailleX+x]=coul;
+#else
+	    _pImage[y*_TailleX+x]=((r+b+g) << 24) + 0x00ffffff;
+#endif
         }
     }
 
@@ -107,12 +117,20 @@ bool MOGL_PoliceBitmap::Charger(const ch
     }
         
     glBindTexture(GL_TEXTURE_2D,_Nom);
+#if !defined(HAVE_GLES)
     glTexImage2D(GL_TEXTURE_2D,0,4,_TailleX,_TailleY,0,GL_RGBA,GL_FLOAT,_Image);
+#else
+    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,_TailleX,_TailleY,0,GL_RGBA,GL_UNSIGNED_BYTE,_pImage);
+#endif
         
     glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
     glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
 
+#if !defined(HAVE_GLES)
     delete [] _Image;
+#else
+    delete [] _pImage;
+#endif
     _NomFichier=p_NomFichier;
     return true;
 }
@@ -138,7 +156,9 @@ void MOGL_PoliceBitmap::Afficher(const s
 
   unsigned int taille;
   Uint16 * unicStr = _AllocAndConvertToUCS2(p_Chaine, taille);
+#if !defined(HAVE_GLES)
   glBegin(GL_QUADS);
+#endif
   float x=p_X;
   float y=p_Y;
   for(unsigned int i=0; i<taille; i++)
@@ -148,7 +168,9 @@ void MOGL_PoliceBitmap::Afficher(const s
       x=_AfficherCaractere(x, y, unicStr[i]);
     }
   }
+#if !defined(HAVE_GLES)
   glEnd();
+#endif
 }
 
 
@@ -177,15 +199,23 @@ void MOGL_PoliceBitmap::Afficher(const s
     {
       glDisable(GL_TEXTURE_2D);
       glColor4f(p_CouleurFond.r, p_CouleurFond.g, p_CouleurFond.b, p_CouleurFond.a);
+#if !defined(HAVE_GLES)
       glBegin(GL_QUADS);
+#endif
       _AfficherFondCaractere(x, y, unicStr[i]);
+#if !defined(HAVE_GLES)
       glEnd();
+#endif
 
       glEnable(GL_TEXTURE_2D);
       glColor4f(p_CouleurTexte.r, p_CouleurTexte.g, p_CouleurTexte.b, p_CouleurTexte.a);
+#if !defined(HAVE_GLES)
       glBegin(GL_QUADS);
+#endif
       x=_AfficherCaractere(x, y, unicStr[i]);
+#if !defined(HAVE_GLES)
       glEnd();
+#endif
     }
   }
 }
@@ -198,6 +228,7 @@ float MOGL_PoliceBitmap::_AfficherCaract
     unsigned int largeur=carac->x2-carac->x1+1;
     unsigned int hauteur=carac->y2-carac->y1+1;
   
+#if !defined(HAVE_GLES)
     glTexCoord2f(carac->x1/static_cast<float>(_TailleX), (carac->y1)/static_cast<float>(_TailleY));
     glVertex2f(p_X, p_Y);
 
@@ -209,6 +240,31 @@ float MOGL_PoliceBitmap::_AfficherCaract
 
     glTexCoord2f((carac->x2+1)/static_cast<float>(_TailleX), (carac->y1)/static_cast<float>(_TailleY));
     glVertex2f(p_X+largeur, p_Y);
+#else
+    GLfloat vtx[] = {
+	p_X, p_Y,
+	p_X, p_Y+hauteur,
+	p_X+largeur, p_Y+hauteur,
+	p_X+largeur, p_Y
+    };
+
+    GLfloat tex[] = {
+	carac->x1/static_cast<float>(_TailleX), (carac->y1)/static_cast<float>(_TailleY),
+	carac->x1/static_cast<float>(_TailleX), (carac->y2+1)/static_cast<float>(_TailleY),
+	(carac->x2+1)/static_cast<float>(_TailleX), (carac->y2+1)/static_cast<float>(_TailleY),
+	(carac->x2+1)/static_cast<float>(_TailleX), (carac->y1)/static_cast<float>(_TailleY)
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+    glVertexPointer(2, GL_FLOAT, 0, vtx);
+    glTexCoordPointer(2, GL_FLOAT, 0, tex);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+    glDisableClientState(GL_VERTEX_ARRAY);
+    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+#endif
   
     return p_X+largeur;
   }
@@ -227,10 +283,24 @@ float MOGL_PoliceBitmap::_AfficherFondCa
     unsigned int largeur=carac->x2-carac->x1+1;
     unsigned int hauteur=carac->y2-carac->y1+1;
   
+#if !defined(HAVE_GLES)
     glVertex2f(p_X, p_Y);
     glVertex2f(p_X, p_Y+hauteur);
     glVertex2f(p_X+largeur, p_Y+hauteur);
     glVertex2f(p_X+largeur, p_Y);
+#else
+    GLfloat quad[] = {
+	p_X, p_Y,
+	p_X, p_Y+hauteur,
+	p_X+largeur, p_Y+hauteur,
+	p_X+largeur, p_Y
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, quad);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+    glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
     return p_X+largeur;
   }
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Police.h briquolo-0.5.7-pandora/src//MOGL/MOGL_Police.h
--- briquolo-0.5.7/src//MOGL/MOGL_Police.h	2006-03-07 15:43:34.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Police.h	2011-02-08 20:17:42.000000000 -0500
@@ -26,7 +26,11 @@
         #include <windows.h>
         #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include <string>
 #include <iostream>
 #include <fstream>
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_PoliceTTF.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_PoliceTTF.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_PoliceTTF.cpp	2008-03-24 08:25:15.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_PoliceTTF.cpp	2011-02-09 19:28:38.000000000 -0500
@@ -1,6 +1,8 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
+ *  Copyright (C) 2011 Darius Hardy <darius@sephs.no-ip.info>
  *
  *  This file is part of BRIQUOLO
  *
@@ -22,7 +24,7 @@
 #include "../I18n.h"
 #include "MOGL_PoliceTTF.h"
 #include <fstream>
-#include <GL/glext.h>
+//#include <GL/glext.h>
 
 #if 1
 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
@@ -43,6 +45,10 @@
 #define    amask 0xff000000
 #endif
 
+#if !defined(GL_UNSIGNED_INT_8_8_8_8) && defined(HAVE_GLES)
+#define GL_UNSIGNED_INT_8_8_8_8                 GL_UNSIGNED_BYTE
+//#define GL_UNSIGNED_INT_8_8_8_8                 GL_UNSIGNED_SHORT_4_4_4_4
+#endif
 
 #define TEXTURE_SIZE   256
 
@@ -128,9 +134,13 @@ void MOGL_PoliceTTF::Afficher(const stri
   {
     MOGL_Struct_Carac * carac = self._GetCarac(unicStr[i]);
     glBindTexture(GL_TEXTURE_2D, carac->TextureName);
+#if !defined(HAVE_GLES)
     glBegin(GL_QUADS);
+#endif
     x=self._AfficherCaractere(x, y, carac);
+#if !defined(HAVE_GLES)
     glEnd();
+#endif
   }
   delete [] unicStr;
 }
@@ -159,16 +169,24 @@ void MOGL_PoliceTTF::Afficher(const stri
     glDisable(GL_TEXTURE_2D);
     glColor4f(p_CouleurFond.r, p_CouleurFond.g, p_CouleurFond.b, p_CouleurFond.a);
     MOGL_Struct_Carac * carac = self._GetCarac(unicStr[i]);
+#if !defined(HAVE_GLES)
     glBegin(GL_QUADS);
+#endif
     self._AfficherFondCaractere(x, y, carac);
+#if !defined(HAVE_GLES)
     glEnd();
+#endif
     glBindTexture(GL_TEXTURE_2D, carac->TextureName);
 
     glEnable(GL_TEXTURE_2D);
     glColor4f(p_CouleurTexte.r, p_CouleurTexte.g, p_CouleurTexte.b, p_CouleurTexte.a);
+#if !defined(HAVE_GLES)
     glBegin(GL_QUADS);
+#endif
     x=self._AfficherCaractere(x, y, carac);
+#if !defined(HAVE_GLES)
     glEnd();
+#endif
   }
   delete [] unicStr;
 }
@@ -180,6 +198,7 @@ float MOGL_PoliceTTF::_AfficherCaractere
     unsigned int largeur=p_Caractere->x2 - p_Caractere->x1;
     unsigned int hauteur=p_Caractere->y2 - p_Caractere->y1;
 
+#if !defined(HAVE_GLES)
     glTexCoord2f(p_Caractere->x1/static_cast<float>(TEXTURE_SIZE), (p_Caractere->y1)/static_cast<float>(TEXTURE_SIZE));
     glVertex2f(p_X, p_Y);
 
@@ -191,6 +210,30 @@ float MOGL_PoliceTTF::_AfficherCaractere
 
     glTexCoord2f((p_Caractere->x2)/static_cast<float>(TEXTURE_SIZE), (p_Caractere->y1)/static_cast<float>(TEXTURE_SIZE));
     glVertex2f(p_X+largeur, p_Y);
+#else
+    GLfloat vtx[] = {
+    	p_X, p_Y,
+	p_X, p_Y+hauteur,
+	p_X+largeur, p_Y+hauteur,
+	p_X+largeur, p_Y
+    };
+    GLfloat tex[] = {
+    	p_Caractere->x1/static_cast<float>(TEXTURE_SIZE), (p_Caractere->y1)/static_cast<float>(TEXTURE_SIZE),
+	p_Caractere->x1/static_cast<float>(TEXTURE_SIZE), (p_Caractere->y2)/static_cast<float>(TEXTURE_SIZE),
+	(p_Caractere->x2)/static_cast<float>(TEXTURE_SIZE), (p_Caractere->y2)/static_cast<float>(TEXTURE_SIZE),
+	(p_Caractere->x2)/static_cast<float>(TEXTURE_SIZE), (p_Caractere->y1)/static_cast<float>(TEXTURE_SIZE)
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+    glVertexPointer(2, GL_FLOAT, 0, vtx);
+    glTexCoordPointer(2, GL_FLOAT, 0, tex);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+
+    glDisableClientState(GL_VERTEX_ARRAY);
+    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+#endif
 
     return p_X+largeur;
   }
@@ -207,10 +250,24 @@ float MOGL_PoliceTTF::_AfficherFondCarac
     unsigned int largeur=p_Caractere->x2-p_Caractere->x1;
     unsigned int hauteur=p_Caractere->y2-p_Caractere->y1;
   
+#if !defined(HAVE_GLES)
     glVertex2f(p_X, p_Y);
     glVertex2f(p_X, p_Y+hauteur);
     glVertex2f(p_X+largeur, p_Y+hauteur);
     glVertex2f(p_X+largeur, p_Y);
+#else
+    GLfloat quad[] = {
+    	p_X, p_Y,
+	p_X, p_Y+hauteur,
+	p_X+largeur, p_Y+hauteur,
+	p_X+largeur, p_Y
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, quad);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+    glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
     return p_X+largeur;
   }
@@ -368,7 +425,7 @@ bool MOGL_PoliceTTF::_CreateCarac(Uint16
   int res = glGetError();
   if (res != 0)
   {
-    cerr<<"glTexImage2D error: "<<res<<endl;
+    cerr<<"MOGL_PoliceTTF::_CreateCarac: glTexImage2D error: "<<res<<endl;
   }
   _MapCarac[p_Carac] = newCarac;
 
@@ -382,7 +439,12 @@ MOGL_PoliceTTF::MOGL_Struct_TextureCarac
   GLuint textureName;
   glGenTextures(1,&textureName);
   glBindTexture(GL_TEXTURE_2D,textureName);
+#if !defined(HAVE_GLES)
   SDL_Surface * SurfaceSDL = SDL_CreateRGBSurface(SDL_SWSURFACE, TEXTURE_SIZE, TEXTURE_SIZE, 32, rmask, gmask, bmask, amask);
+#else
+  // Need to swap Red and Alpha to allow TTF to render red into alpha channel
+  SDL_Surface * SurfaceSDL = SDL_CreateRGBSurface(SDL_SWSURFACE, TEXTURE_SIZE, TEXTURE_SIZE, 32, amask, gmask, bmask, rmask);
+#endif
   if (SurfaceSDL == NULL)
   {
     cerr<<"SDL_CreateRGBSurface error: "<<SDL_GetError()<<endl;
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Polygone.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Polygone.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Polygone.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Polygone.cpp	2011-02-09 19:32:10.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
  *
  *  This file is part of BRIQUOLO
  *
@@ -52,6 +53,7 @@ void MOGL_Polygone::Afficher()
   glDisable(GL_ALPHA_TEST);
   glDisable(GL_DEPTH_TEST);
 
+#if !defined(HAVE_GLES)
   glBegin(GL_POLYGON);
   for(MOGL_ItVector_Point it=_VectorPoint.begin(); it!=_VectorPoint.end(); it++)
   {
@@ -59,6 +61,28 @@ void MOGL_Polygone::Afficher()
     glVertex2f(it->X, it->Y);
   }
   glEnd();
+#else
+  GLfloat vtx[_VectorPoint.size()*2];
+  GLfloat col[_VectorPoint.size()*4];
+  int v=0, c=0;
+  for(MOGL_ItVector_Point it=_VectorPoint.begin(); it!=_VectorPoint.end(); it++) {
+	vtx[v++] = it->X;
+	vtx[v++] = it->Y;
+	col[c++] = it->Couleur.r;
+	col[c++] = it->Couleur.g;
+	col[c++] = it->Couleur.b;
+	col[c++] = it->Couleur.a;
+  }
+  glEnableClientState(GL_VERTEX_ARRAY);
+  glEnableClientState(GL_COLOR_ARRAY);
+
+  glVertexPointer(2, GL_FLOAT, 0, vtx);
+  glColorPointer(4, GL_FLOAT, 0, col);
+  glDrawArrays(GL_TRIANGLE_FAN,0,_VectorPoint.size());
+
+  glDisableClientState(GL_COLOR_ARRAY);
+  glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 }
 
 void MOGL_Polygone::SetPosition(unsigned int p_Indice, unsigned int p_X, unsigned int p_Y)
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_SaisieChaine.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_SaisieChaine.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_SaisieChaine.cpp	2008-03-24 08:25:15.000000000 -0400
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_SaisieChaine.cpp	2011-02-09 19:32:28.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
  *
  *  This file is part of BRIQUOLO
  *
@@ -71,12 +72,27 @@ void MOGL_SaisieChaine::Afficher()
   {
     _Police->Afficher(texte, 0, 0, _CouleurTexte, _CouleurFondFocus);
     glDisable(GL_TEXTURE_2D);
+#if !defined(HAVE_GLES)
     glBegin(GL_QUADS);
     glVertex2f(taille,0);
     glVertex2f(taille, _Police->GetTailleYCaractere('A'));
     glVertex2f(taille + _Police->GetTailleXMax(), _Police->GetTailleYMax());
     glVertex2f(taille + _Police->GetTailleXMax(), 0);
     glEnd();
+#else
+    GLfloat quad[] = {
+	taille,0,
+	taille, _Police->GetTailleYCaractere('A'),
+	taille + _Police->GetTailleXMax(), _Police->GetTailleYMax(),
+	taille + _Police->GetTailleXMax(), 0
+    };
+
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, quad);
+    glDrawArrays(GL_TRIANGLE_FAN,0,4);
+    glDisableClientState(GL_VERTEX_ARRAY);
+
+#endif
   }
   else
   {
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Spot.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Spot.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Spot.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Spot.cpp	2011-02-09 19:32:40.000000000 -0500
@@ -21,10 +21,11 @@
  *****************************************************************************/
 #include "MOGL_Spot.h"
 
+/*
 #ifndef M_PI
 #define M_PI 3.14159265359
 #endif
-
+*/
 void MOGL_Spot::SetDirection(const MOGL_Struct_Vecteur & p_Direction)
 {
   float norm=p_Direction.x*p_Direction.x+p_Direction.y*p_Direction.y+p_Direction.z*p_Direction.z;
@@ -63,8 +64,10 @@ void MOGL_Spot::TnL(MOGL_Afficheur * p_A
   glEnable(_NumLight);
 
   int Pos[4]={0,0,0,1};
+#if !defined(HAVE_GLES)
   glLightiv(_NumLight,GL_POSITION,Pos);
   glLightfv(_NumLight,GL_SPOT_DIRECTION,(GLfloat*)&_Direction);
+#endif
   glLightf(_NumLight,GL_SPOT_CUTOFF,_CutOff);
   glLightf(_NumLight,GL_SPOT_EXPONENT,_Exposant);
 
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Structure.h briquolo-0.5.7-pandora/src//MOGL/MOGL_Structure.h
--- briquolo-0.5.7/src//MOGL/MOGL_Structure.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Structure.h	2011-02-08 20:18:57.000000000 -0500
@@ -26,7 +26,11 @@
         #include <windows.h>
         #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 //#include "MOGL_ObjetAbstrait2.h"
 class MOGL_ObjetAbstrait2;
 
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Texture.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Texture.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Texture.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Texture.cpp	2011-02-09 19:33:05.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Darius Hardy <darius@sephs.no-ip.info>
  *
  *  This file is part of BRIQUOLO
  *
@@ -21,10 +22,16 @@
  *****************************************************************************/
 #include "MOGL_Texture.h"
 #include "MOGL_Temps.h"
+#ifdef HAVE_GLES
+#include "GLES/gl.h"
+#define GL_CLAMP GL_CLAMP_TO_EDGE
+#else
 #include "GL/gl.h"
+#endif
 #include "GL/glu.h"
 #include <iostream>
 
+
 MOGL_Texture::MOGL_Texture(MOGL_Enum_TypeTexture p_TypeTexture, bool p_AutoriserTrou, bool p_MipMap):
   MOGL_Image(p_AutoriserTrou), _Nom(0), _RepeterTexture(true), _TypeTexture(p_TypeTexture),
   _Animer(false), _VitesseX(0), _VitesseY(0), _VitesseRotation(0), _TranslationX(0), _TranslationY(0), _Rotation(0),
@@ -93,22 +100,79 @@ bool MOGL_Texture::ChargerPNG(const char
   return true;
 }
 
+static void _Puissance2(unsigned int p_Nombre, unsigned int & p_NombrePuissance)
+{
+  for(int i=0;; i++)
+  {
+    p_NombrePuissance=static_cast<unsigned int>(pow(static_cast<float>(2), i));
+    if (p_NombrePuissance >= p_Nombre)
+    {
+      return;
+    }
+  }
+}
+
 void MOGL_Texture::_Init()
 {
+  int res = 0;
+#if defined(HAVE_GLES)
+  unsigned int nouveauTailleX, nouveauTailleY;
+
+  _Puissance2(_TailleX, nouveauTailleX);
+  _Puissance2(_TailleY, nouveauTailleY);
+  GLuint *imageNouveau=new GLuint[nouveauTailleX*nouveauTailleY];
+  for(unsigned int y=0; y<nouveauTailleY; y++)
+  {
+    for(unsigned int x=0; x<nouveauTailleX; x++)
+    {
+      if (x<_TailleX && y<_TailleY)
+      {
+         MOGL_Struct_Couleur im = _Image[y*_TailleX+x];
+         GLuint pix = min(int(im.a * 255.0f), 255);
+         pix = (pix << 8) + min(int(im.b * 255.0f), 0xff);
+         pix = (pix << 8) + min(int(im.g * 255.0f), 0xff);
+         pix = (pix << 8) + min(int(im.r * 255.0f), 0xff);
+         imageNouveau[y*nouveauTailleX+x] = pix;
+      }
+      else
+      {
+        imageNouveau[y*nouveauTailleX+x] = 0xff000000;
+      }
+    }
+   }
+  _RecX=static_cast<float>(_TailleX)/nouveauTailleX;
+  _RecY=static_cast<float>(_TailleY)/nouveauTailleY;
+#endif
+
   if (_Nom==0)
   {
     glGenTextures(1,&_Nom);
   }
 
+  cout << "MOGL_Texture::_Init : glBindTexture("<< _NomFichier<< ", " << _MipMap << ");" <<endl;
   glBindTexture(GL_TEXTURE_2D,_Nom);
   if (_MipMap)
   {
+#if !defined(HAVE_GLES)
     gluBuild2DMipmaps(GL_TEXTURE_2D, 4, _TailleX, _TailleY, GL_RGBA, GL_FLOAT, _Image);
+#else
+    glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
+    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, nouveauTailleX, nouveauTailleY, 0,
+                 GL_RGBA,GL_UNSIGNED_BYTE, imageNouveau);
+#endif
+    res = glGetError();
+    if (res != 0)
+      cerr<<"glTexImage2D(MIP) error: "<<res<<endl;
     glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
   }
   else
   {
-    glTexImage2D(GL_TEXTURE_2D,0,4,_TailleX,_TailleY,0,GL_RGBA,GL_FLOAT,_Image);
+    //glTexImage2D(GL_TEXTURE_2D,0,4,_TailleX,_TailleY,0,GL_RGBA,GL_FLOAT,_Image);
+#if !defined(HAVE_GLES)
+    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,_TailleX,_TailleY,0,GL_RGBA,GL_FLOAT,_Image);
+#else
+    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,nouveauTailleX,nouveauTailleY,0,GL_RGBA,GL_UNSIGNED_BYTE, imageNouveau);
+#endif
     glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
   }
 
@@ -124,6 +188,15 @@ void MOGL_Texture::_Init()
     glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
     glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
   }
+
+  res = glGetError();
+  if (res != 0)
+  {
+    cerr<<"glTexImage2D error: "<<res<<endl;
+  }
+#if defined(HAVE_GLES)
+  delete [] imageNouveau;
+#endif
 }
 
 MOGL_Texture::MOGL_Enum_TypeTexture MOGL_Texture::GetTypeTexture() const
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Texture.h briquolo-0.5.7-pandora/src//MOGL/MOGL_Texture.h
--- briquolo-0.5.7/src//MOGL/MOGL_Texture.h	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Texture.h	2011-02-09 17:37:05.000000000 -0500
@@ -29,7 +29,11 @@
   #include <windows.h>
   #include <windowsx.h>
 #endif
+#if !defined(HAVE_GLES)
 #include <GL/gl.h>
+#else
+#include <GLES/gl.h>
+#endif
 #include "MOGL_Structure.h"
 #include "MOGL_Image.h"
 
@@ -66,6 +70,12 @@ class MOGL_Texture: public MOGL_Image
     float _Temps;
     bool _MipMap;
 
+#if defined(HAVE_GLES)
+  // Needed for non-power-of-2 texturing, says how big the image really is.
+  public:
+    float _RecX, _RecY;
+#endif
+
   public :
     /**
        Constructeur.
diff -rNup briquolo-0.5.7/src//MOGL/MOGL_Univers.cpp briquolo-0.5.7-pandora/src//MOGL/MOGL_Univers.cpp
--- briquolo-0.5.7/src//MOGL/MOGL_Univers.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//MOGL/MOGL_Univers.cpp	2011-02-09 19:33:23.000000000 -0500
@@ -1,6 +1,7 @@
 /*****************************************************************************
  *
  *  Copyright (C) 2003 Cédric Brégardis <cedric.bregardis@free.fr>
+ *  Copyright (C) 2011 Sébastien Huss <sebastien.huss@gmail.com>
  *
  *  This file is part of BRIQUOLO
  *
@@ -47,10 +48,18 @@ void MOGL_Univers::Afficher()
   _Noeud.TnL(&_Afficheur);      
   glLoadIdentity();
   glColor4f(1,1,1,1);
+#if !defined(HAVE_GLES)
   glDepthRange(0,1);
+#else
+  glDepthRangef(0,1);
+#endif
   //glClear(GL_DEPTH_BUFFER_BIT);
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+#if !defined(HAVE_GLES)
   glDepthRange(0,0.99);
+#else
+  glDepthRangef(0,0.99);
+#endif
   
   _Afficheur.AfficherOpaque();
 
@@ -59,11 +68,19 @@ void MOGL_Univers::Afficher()
   glLoadIdentity();
   glColor4f(1,1,1,1);
 //  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+#if !defined(HAVE_GLES)
   glDepthRange(0.99,1);
+#else
+  glDepthRangef(0.99,1);
+#endif
   
   _AfficheurFond.AfficherOpaque();
 
+#if !defined(HAVE_GLES)
   glDepthRange(0,0.99);
+#else
+  glDepthRangef(0,0.99);
+#endif
   _Afficheur.AfficherNonOpaque();
 }
 
diff -rNup briquolo-0.5.7/src//Option.cpp briquolo-0.5.7-pandora/src//Option.cpp
--- briquolo-0.5.7/src//Option.cpp	2008-03-22 09:17:15.000000000 -0400
+++ briquolo-0.5.7-pandora/src//Option.cpp	2011-01-28 17:04:43.000000000 -0500
@@ -26,8 +26,8 @@
 
 using namespace std;
 
-ElementOptionInt Option::ResolutionX("ResolutionX", 800);
-ElementOptionInt Option::ResolutionY("ResolutionY", 600);
+ElementOptionInt Option::ResolutionX("ResolutionX", 640);
+ElementOptionInt Option::ResolutionY("ResolutionY", 480);
 ElementOptionBool Option::Fullscreen("Fullscreen", false);
 ElementOptionBool Option::AfficherFPS("FPS", false);
 ElementOptionInt Option::MaxFPS("MaxFPS", 0);
diff -rNup briquolo-0.5.7/src//Plateau.cpp briquolo-0.5.7-pandora/src//Plateau.cpp
--- briquolo-0.5.7/src//Plateau.cpp	2007-03-22 10:53:43.000000000 -0400
+++ briquolo-0.5.7-pandora/src//Plateau.cpp	2011-01-28 22:01:39.000000000 -0500
@@ -27,10 +27,11 @@
 #include "Constante.h"
 #include "Plateau.h"
 
+/*
 #ifndef M_PI
 #define M_PI 3.14159265359
 #endif
-
+*/
 #define PLAT_DIV_FACT 2000
 
 
diff -rNup briquolo-0.5.7/src//TableauEditeur.cpp briquolo-0.5.7-pandora/src//TableauEditeur.cpp
--- briquolo-0.5.7/src//TableauEditeur.cpp	2006-03-07 15:31:24.000000000 -0500
+++ briquolo-0.5.7-pandora/src//TableauEditeur.cpp	2011-02-09 19:08:28.000000000 -0500
@@ -135,6 +135,10 @@ void TableauEditeur::ClavierUp(SDL_keysy
             _Curseur->SetPosition(x, y);
             break;
           }
+#ifdef PANDORA
+          case SDLK_HOME:
+          case SDLK_PAGEDOWN:
+#endif
           case SDLK_SPACE :
           {
             ElementTableau * elem=Gestionnaire::GetElementTableau(_PanneauOutilsEditeur->GetIdentifiantElement(), this);
@@ -312,6 +316,10 @@ void TableauEditeur::ClavierUp(SDL_keysy
             }
             break;
           }
+#ifdef PANDORA
+          case SDLK_HOME:
+          case SDLK_PAGEDOWN:
+#endif
           case SDLK_SPACE :
           {
             if (_ElementCourant!=NULL)
diff -rNup briquolo-0.5.7/src//TableauJeu.cpp briquolo-0.5.7-pandora/src//TableauJeu.cpp
--- briquolo-0.5.7/src//TableauJeu.cpp	2007-03-22 10:53:36.000000000 -0400
+++ briquolo-0.5.7-pandora/src//TableauJeu.cpp	2011-02-08 20:45:31.000000000 -0500
@@ -618,6 +618,10 @@ void TableauJeu::ClavierUp(SDL_keysym *
       _Camera->ChangerVue();
       break;
     }
+#ifdef PANDORA
+    case SDLK_HOME:
+    case SDLK_PAGEDOWN:
+#endif
     case SDLK_SPACE :
     {
       _OnDepartBalle();
--- briquolo-0.5.7/configure.ac	2008-03-24 08:43:32.000000000 -0400
+++ briquolo-0.5.7-pandora/configure.ac	2011-02-08 19:51:12.000000000 -0500
@@ -70,6 +70,12 @@ else
      LIBS="$LIBS `$pngconfig --ldflags` `$pngconfig --libs`"
 fi
 
+AC_ARG_ENABLE([gles],
+              [AC_HELP_STRING([--enable-gles=@<:@yes/no@:>@],
+                              [Use GLES instead of GL @<:@default=no@:>@])],
+              [],
+              [enable_gles=no])
+
 
 dnl Nécessaire pour le test SDL
 dnl AC_CANONICAL_HOST
@@ -118,15 +124,31 @@ case "${host}" in
         LIBS="$LIBS -L$x_libraries"
     fi
 
-    LIB_GL=GL
-    LIB_GLU=GLU
     PROGRAM_EXT=
     AC_MSG_RESULT(Host OS is not Win32)
-    dnl Test de OpenGL
-    AC_CHECK_LIB($LIB_GL,glVertex3f,,[AC_MSG_ERROR([*** You need OpenGL])])
+    if test "x$enable_gles" = "xyes";then
+      LIB_GL=GLES_CM
+      LIB_GLU=GLUES_CM
+      dnl Test de OpenGL
+      AC_CHECK_LIB($LIB_GL,glTexParameteri,,[AC_MSG_ERROR([*** You need OpenGLES])])
+
+      dnl Test de glu
+      AC_CHECK_LIB($LIB_GLU,gluOrtho2D,,[AC_MSG_ERROR([*** You need GlUES])],  -lm )
+
+      dnl Test de EGL
+      AC_CHECK_LIB(EGL,eglBindAPI,,[AC_MSG_ERROR([*** You need EGL])],  -lm )
+
+      dnl Test de X11
+      AC_CHECK_LIB(X11,XOpenDisplay,,[AC_MSG_ERROR([*** You need X11 library])],  -lm )
+    else
+      LIB_GL=GL
+      LIB_GLU=GLU
+      dnl Test de OpenGL
+      AC_CHECK_LIB($LIB_GL,glVertex3f,,[AC_MSG_ERROR([*** You need OpenGL])])
 
-    dnl Test de glu
-    AC_CHECK_LIB($LIB_GLU,gluLookAt,,[AC_MSG_ERROR([*** You need Glu])],  -lm )
+      dnl Test de glu
+      AC_CHECK_LIB($LIB_GLU,gluLookAt,,[AC_MSG_ERROR([*** You need Glu])],  -lm )
+    fi
 
     dnl Test de SDL-mixer
     AC_CHECK_LIB(SDL_mixer,Mix_OpenAudio,,[AC_MSG_ERROR([SDL-mixer])])
@@ -136,6 +158,7 @@ case "${host}" in
     AC_CHECK_LIB(SDL_ttf,TTF_Init,,[AC_MSG_ERROR([SDL_ttf])])
     LIBS="$LIBS -lSDL_ttf"
 esac
+AM_CONDITIONAL(HAVE_GLES, test "x$enable_gles" = xyes)
 
 
 dnl Debugging
