Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Merged Jim's Google Summer of Code work from SDL-gsoc2010_gesture
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 22, 2010
2 parents bafd048 + 8b6ea0c commit 18a406d
Show file tree
Hide file tree
Showing 72 changed files with 7,646 additions and 3,315 deletions.
19 changes: 18 additions & 1 deletion README.DirectFB
Expand Up @@ -65,10 +65,26 @@ you need to have the following font installed:
OPENGL Support
==============

As of this writing 20070810 you need to pull Mesa from git and do the following:
The following instructions will give you *software* opengl. However this
works at least on all directfb supported platforms.

As of this writing 20100802 you need to pull Mesa from git and do the following:

------------------------
git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a
cd mesa
git clone git://anongit.freedesktop.org/git/mesa/mesa
------------------------

Edit configs/linux-directfb so that the Directories-section looks like
------------------------
# Directories
SRC_DIRS = mesa glu
GLU_DIRS = sgi
DRIVER_DIRS = directfb
PROGRAM_DIRS =
------------------------

make linux-directfb
make

Expand All @@ -87,3 +103,4 @@ export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib
export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7

./testgl

97 changes: 88 additions & 9 deletions configure.in
Expand Up @@ -1041,6 +1041,8 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
xss_lib='/usr/X11R6/lib/libXss.6.dylib'
xdamage_lib='/usr/X11R6/lib/libXdamage.1.dylib'
xfixes_lib='/usr/X11R6/lib/libXfixes.3.dylib'
;;
*-*-osf*)
x11_lib='libX11.so'
Expand All @@ -1057,6 +1059,8 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xdamage_lib=[`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
;;
esac

Expand Down Expand Up @@ -1130,16 +1134,13 @@ AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for ful
])
if test x$have_xrandr_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
echo "-- dynamic libXrender -> $xrender_lib"
echo "-- dynamic libXrandr -> $xrandr_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
definitely_enable_video_x11_xrandr=yes
else
AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
if test x$have_xrender_lib = xyes && test x$have_xrandr_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr -lXrender"
if test x$have_xrandr_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
definitely_enable_video_x11_xrandr=yes
fi
fi
Expand Down Expand Up @@ -1201,7 +1202,69 @@ AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension
if test x$definitely_enable_video_x11_scrnsaver = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER)
fi

AC_ARG_ENABLE(video-x11-xrender,
AC_HELP_STRING([--enable-video-x11-xrender], [enable X11 Xrender extension [[default=yes]]]),
, enable_video_x11_xrender=yes)
if test x$enable_video_x11_xrender = xyes; then
AC_CHECK_HEADER(X11/extensions/Xrender.h,
have_xrender_h_hdr=yes,
have_xrender_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_xrender_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xrender_lib != x ; then
echo "-- dynamic libXrender -> $xrender_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
definitely_enable_video_x11_xrender=yes
else
AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
if test x$have_xrender_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrender"
definitely_enable_video_x11_xrender=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xrender = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRENDER)
fi
AC_ARG_ENABLE(video-x11-xdamage-xfixes,
AC_HELP_STRING([--enable-video-x11-xdamage-xfixes], [enable X11 Xdamage and Xfixes extensions [[default=yes]]]),
, enable_video_x11_xdamage=yes)
if test x$enable_video_x11_xdamage = xyes && test x$definitely_enable_video_x11_xrender = xyes ; then
AC_CHECK_HEADER(X11/extensions/Xdamage.h,
have_xdamage_h_hdr=yes,
have_xdamage_h_hdr=no,
[#include <X11/Xlib.h>
])
AC_CHECK_HEADER(X11/extensions/Xfixes.h,
have_xfixes_h_hdr=yes,
have_xfixes_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_xdamage_h_hdr = xyes && test x$have_xfixes_h_hdr = xyes ; then
if test x$enable_x11_shared = xyes && test x$xdamage_lib != x && test x$xfixes_lib != x ; then
echo "-- dynamic libXdamage -> $xdamage_lib"
echo "-- dynamic libXfixes -> $xfixes_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XDAMAGE, "$xdamage_lib")
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES, "$xfixes_lib")
definitely_enable_video_x11_xdamage=yes
definitely_enable_video_x11_xfixes=yes
else
AC_CHECK_LIB(Xdamage, XDamageQueryExtension, have_xdamage_lib=yes)
AC_CHECK_LIB(Xfixes, XFixesQueryExtension, have_xfixes_lib=yes)
if test x$have_xdamage_lib = xyes && test x$have_xfixes_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXdamage -lXfixes"
definitely_enable_video_x11_xdamage=yes
definitely_enable_video_x11_xfixes=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xdamage = xyes && test x$definitely_enable_video_x11_xfixes = xyes ; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XDAMAGE)
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XFIXES)
fi
AC_ARG_ENABLE(render-x11,
AC_HELP_STRING([--enable-render-x11], [enable the X11 render driver [[default=yes]]]),
, enable_render_x11=yes)
Expand Down Expand Up @@ -1919,7 +1982,7 @@ CheckWIN32()
AC_MSG_CHECKING(Windows CE)
have_wince=no
AC_TRY_COMPILE([
#ifndef _WIN32_WCE
#if !defined(_WIN32_WCE) && !defined(__MINGW32CE__)
#error This is not Windows CE
#endif
],[
Expand Down Expand Up @@ -2390,6 +2453,12 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
SOURCES="$SOURCES $srcdir/src/atomic/win32/*.c"
have_atomic=yes
fi
# Set up dummy files for the joystick for now
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_DUMMY)
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
have_joystick=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
AC_DEFINE(SDL_THREAD_WIN32)
Expand All @@ -2413,10 +2482,20 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
fi
# Set up the system libraries we need
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer"

# mingw32ce library
case "$host" in
*-mingw32ce)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmingwex"
;;
*)
;;
esac

# The Win32 platform requires special setup
SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main -D_WIN32_WCE=0x420"
SDL_LIBS="-lSDLmain $SDL_LIBS"
EXTRA_CFLAGS="$EXTRA_CFLAGS -Dmain=SDL_main -D_WIN32_WCE=0x420"
EXTRA_LDFLAGS="-lSDLmain $EXTRA_LDFLAGS"
;;
*-*-cygwin* | *-*-mingw32*)
ARCH=win32
Expand Down
8 changes: 4 additions & 4 deletions include/SDL.h
Expand Up @@ -139,16 +139,16 @@ extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);

/**
* This function returns mask of the specified subsystems which have
* been initialized.
* This function returns a mask of the specified subsystems which have
* previously been initialized.
*
* If \c flags is 0, it returns a mask of all initialized subsystems.
*/
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);

/**
* This function cleans up all initialized subsystems and unloads the
* dynamically linked library. You should call it upon all exit conditions.
* This function cleans up all initialized subsystems. You should
* call it upon all exit conditions.
*/
extern DECLSPEC void SDLCALL SDL_Quit(void);

Expand Down
7 changes: 7 additions & 0 deletions include/SDL_config.h.in
Expand Up @@ -272,12 +272,19 @@
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XDAMAGE
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES
#undef SDL_VIDEO_DRIVER_X11_VIDMODE
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
#undef SDL_VIDEO_DRIVER_X11_XRANDR
#undef SDL_VIDEO_DRIVER_X11_XINPUT
#undef SDL_VIDEO_DRIVER_X11_SCRNSAVER
#undef SDL_VIDEO_DRIVER_X11_XV
#undef SDL_VIDEO_DRIVER_X11_XRENDER
#undef SDL_VIDEO_DRIVER_X11_XDAMAGE
#undef SDL_VIDEO_DRIVER_X11_XFIXES

#undef SDL_VIDEO_RENDER_X11

#undef SDL_VIDEO_RENDER_D3D
#undef SDL_VIDEO_RENDER_GDI
Expand Down
5 changes: 5 additions & 0 deletions include/SDL_endian.h
Expand Up @@ -40,6 +40,10 @@
/*@}*/

#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
#ifdef __linux__
#include <endian.h>
#define SDL_BYTEORDER __BYTE_ORDER
#else /* __linux __ */
#if defined(__hppa__) || \
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
(defined(__MIPS__) && defined(__MISPEB__)) || \
Expand All @@ -49,6 +53,7 @@
#else
#define SDL_BYTEORDER SDL_LIL_ENDIAN
#endif
#endif /* __linux __ */
#endif /* !SDL_BYTEORDER */


Expand Down
10 changes: 5 additions & 5 deletions include/SDL_events.h
Expand Up @@ -148,7 +148,7 @@ typedef struct SDL_KeyboardEvent
Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
Uint32 windowID; /**< The window with keyboard focus, if any */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 padding1;
Uint8 repeat; /**< Non-zero if this is a key repeat */
Uint8 padding2;
Uint8 padding3;
SDL_keysym keysym; /**< The key that was pressed or released */
Expand Down Expand Up @@ -475,12 +475,12 @@ typedef enum
* the back of the event queue.
*
* If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front
* of the event queue, matching \c mask, will be returned and will not
* be removed from the queue.
* of the event queue, within the specified minimum and maximum type,
* will be returned and will not be removed from the queue.
*
* If \c action is ::SDL_GETEVENT, up to \c numevents events at the front
* of the event queue, matching \c mask, will be returned and will be
* removed from the queue.
* of the event queue, within the specified minimum and maximum type,
* will be returned and will be removed from the queue.
*
* \return The number of events actually stored, or -1 if there was an error.
*
Expand Down

0 comments on commit 18a406d

Please sign in to comment.