Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows

  • Loading branch information
slouken committed Aug 22, 2010
2 parents 7bfa18c + 70ec6d3 commit 7de0704c1e5d30e00fa350d04e8c35770850a122
Showing with 20,725 additions and 6,749 deletions.
  1. +34 −21 .hgignore
  2. +52 −0 Makefile.android
  3. +1 −1 Makefile.in
  4. +4 −3 Makefile.pandora
  5. +18 −1 README.DirectFB
  6. +45 −0 README.android
  7. +72 −0 README.gesture
  8. +1 −9 README.iphoneos
  9. +101 −0 README.touch
  10. +74 −4 VisualC/SDL/{SDL.vcproj → SDL_VS2005.vcproj}
  11. +24 −4 VisualC/SDL/SDL_VS2008.vcproj
  12. +4 −4 VisualC/{SDL.sln → SDL_VS2005.sln}
  13. +321 −1 VisualC/SDL_VS2008.sln
  14. +20 −0 VisualC/SDLmain/{SDLmain.vcproj → SDLmain_VS2005.vcproj}
  15. +3 −3 VisualC/SDLmain/SDLmain_VS2008.vcproj
  16. +4 −0 VisualC/tests/automated/{automated.vcproj → automated_VS2008.vcproj}
  17. 0 VisualC/tests/checkkeys/{checkkeys.vcproj → checkkeys_VS2005.vcproj}
  18. +208 −0 VisualC/tests/checkkeys/checkkeys_VS2008.vcproj
  19. 0 VisualC/tests/graywin/{graywin.vcproj → graywin_VS2005.vcproj}
  20. +208 −0 VisualC/tests/graywin/graywin_VS2008.vcproj
  21. 0 VisualC/tests/loopwave/{loopwave.vcproj → loopwave_VS2005.vcproj}
  22. +208 −0 VisualC/tests/loopwave/loopwave_VS2008.vcproj
  23. 0 VisualC/tests/testalpha/{testalpha.vcproj → testalpha_VS2005.vcproj}
  24. +208 −0 VisualC/tests/testalpha/testalpha_VS2008.vcproj
  25. 0 VisualC/tests/testdraw2/{testdraw2.vcproj → testdraw2_VS2005.vcproj}
  26. +212 −0 VisualC/tests/testdraw2/testdraw2_VS2008.vcproj
  27. 0 VisualC/tests/testfile/{testfile.vcproj → testfile_VS2005.vcproj}
  28. +208 −0 VisualC/tests/testfile/testfile_VS2008.vcproj
  29. 0 VisualC/tests/testgamma/{testgamma.vcproj → testgamma_VS2005.vcproj}
  30. +208 −0 VisualC/tests/testgamma/testgamma_VS2008.vcproj
  31. 0 VisualC/tests/testgl/{testgl.vcproj → testgl_VS2005.vcproj}
  32. +210 −0 VisualC/tests/testgl/testgl_VS2008.vcproj
  33. 0 VisualC/tests/testgl2/{testgl2.vcproj → testgl2_VS2005.vcproj}
  34. +214 −0 VisualC/tests/testgl2/testgl2_VS2008.vcproj
  35. 0 VisualC/tests/testjoystick/{testjoystick.vcproj → testjoystick_VS2005.vcproj}
  36. +208 −0 VisualC/tests/testjoystick/testjoystick_VS2008.vcproj
  37. 0 VisualC/tests/testoverlay/{testoverlay.vcproj → testoverlay_VS2005.vcproj}
  38. +208 −0 VisualC/tests/testoverlay/testoverlay_VS2008.vcproj
  39. 0 VisualC/tests/testoverlay2/{testoverlay2.vcproj → testoverlay2_VS2005.vcproj}
  40. +208 −0 VisualC/tests/testoverlay2/testoverlay2_VS2008.vcproj
  41. 0 VisualC/tests/testpalette/{testpalette.vcproj → testpalette_VS2005.vcproj}
  42. +208 −0 VisualC/tests/testpalette/testpalette_VS2008.vcproj
  43. 0 VisualC/tests/testplatform/{testplatform.vcproj → testplatform_VS2005.vcproj}
  44. +212 −0 VisualC/tests/testplatform/testplatform_VS2008.vcproj
  45. 0 VisualC/tests/testpower/{testpower.vcproj → testpower_VS2005.vcproj}
  46. +209 −0 VisualC/tests/testpower/testpower_VS2008.vcproj
  47. 0 VisualC/tests/testsprite/{testsprite.vcproj → testsprite_VS2005.vcproj}
  48. +208 −0 VisualC/tests/testsprite/testsprite_VS2008.vcproj
  49. 0 VisualC/tests/testsprite2/{testsprite2.vcproj → testsprite2_VS2005.vcproj}
  50. +212 −0 VisualC/tests/testsprite2/testsprite2_VS2008.vcproj
  51. 0 VisualC/tests/testvidinfo/{testvidinfo.vcproj → testvidinfo_VS2005.vcproj}
  52. +208 −0 VisualC/tests/testvidinfo/testvidinfo_VS2008.vcproj
  53. 0 VisualC/tests/testwin/{testwin.vcproj → testwin_VS2005.vcproj}
  54. +208 −0 VisualC/tests/testwin/testwin_VS2008.vcproj
  55. 0 VisualC/tests/testwm/{testwm.vcproj → testwm_VS2005.vcproj}
  56. +208 −0 VisualC/tests/testwm/testwm_VS2008.vcproj
  57. +17 −2 Xcode-iPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj
  58. +0 −2 Xcode-iPhoneOS/Demos/src/fireworks.c
  59. +2 −3 Xcode-iPhoneOS/Demos/src/mixer.c
  60. +0 −1 Xcode-iPhoneOS/Demos/src/touch.c
  61. +49 −5 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
  62. +18 −7 Xcode-iPhoneOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
  63. +123 −3 Xcode/SDL/SDL.xcodeproj/project.pbxproj
  64. +28 −0 Xcode/SDL/testsdl-Info.plist
  65. +1 −0 android/config.cfg
  66. +15 −0 android/project/AndroidManifest.xml
  67. +17 −0 android/project/build.properties
  68. +67 −0 android/project/build.xml
  69. +11 −0 android/project/default.properties
  70. +18 −0 android/project/jni/Android.mk
  71. +242 −0 android/project/jni/android-support.cpp
  72. +574 −0 android/project/jni/lesson05.c
  73. +10 −0 android/project/local.properties
  74. BIN android/project/res/drawable-hdpi/icon.png
  75. BIN android/project/res/drawable-ldpi/icon.png
  76. BIN android/project/res/drawable-mdpi/icon.png
  77. +13 −0 android/project/res/layout/main.xml
  78. +4 −0 android/project/res/values/strings.xml
  79. +388 −0 android/project/src/org/libsdl/app/SDLActivity.java
  80. +15 −0 android/scripts/acc.sh
  81. +20 −0 android/scripts/ald.sh
  82. +91 −10 configure.in
  83. +5 −4 include/SDL.h
  84. +1 −1 include/SDL_atomic.h
  85. +76 −0 include/SDL_clipboard.h
  86. +1 −0 include/SDL_compat.h
  87. +5 −0 include/SDL_config.h.in
  88. +145 −0 include/SDL_config_android.h
  89. +2 −5 include/SDL_config_iphoneos.h
  90. +6 −0 include/SDL_config_pandora.h
  91. +5 −0 include/SDL_endian.h
  92. +111 −45 include/SDL_events.h
  93. +92 −0 include/SDL_gesture.h
  94. +88 −0 include/SDL_input.h
  95. +8 −20 include/SDL_keyboard.h
  96. +51 −98 include/SDL_mouse.h
  97. +1 −1 include/SDL_mutex.h
  98. +3,352 −1,577 include/SDL_opengl.h
  99. +1 −2 include/SDL_pixels.h
  100. +5 −0 include/SDL_platform.h
  101. +29 −4 include/SDL_stdinc.h
  102. +1 −19 include/SDL_syswm.h
  103. +0 −10 include/SDL_thread.h
  104. +125 −0 include/SDL_touch.h
  105. +7 −7 include/SDL_version.h
  106. +1 −2 include/SDL_video.h
  107. +3 −11 src/SDL.c
  108. +1 −0 src/SDL_assert.c
  109. +26 −0 src/SDL_assert_c.h
  110. +1 −6 src/SDL_compat.c
  111. +4 −3 src/SDL_error.c
  112. +1 −0 src/SDL_error_c.h
  113. +16 −8 src/audio/SDL_audio.c
  114. +1 −0 src/audio/SDL_audiodev.c
  115. +140 −0 src/audio/android/SDL_androidaudio.c
  116. +42 −0 src/audio/android/SDL_androidaudio.h
  117. +0 −4 src/audio/windx5/directx.h
  118. +1 −1 src/cpuinfo/SDL_cpuinfo.c
  119. +47 −0 src/events/SDL_clipboardevents.c
  120. +31 −0 src/events/SDL_clipboardevents_c.h
  121. +7 −0 src/events/SDL_events.c
  122. +2 −1 src/events/SDL_events_c.h
  123. +643 −0 src/events/SDL_gesture.c
  124. +35 −0 src/events/SDL_gesture_c.h
  125. +54 −161 src/events/SDL_keyboard.c
  126. +10 −37 src/events/SDL_keyboard_c.h
  127. +134 −418 src/events/SDL_mouse.c
  128. +9 −84 src/events/SDL_mouse_c.h
  129. +555 −0 src/events/SDL_touch.c
  130. +79 −0 src/events/SDL_touch_c.h
  131. +8 −8 src/events/scancodes_win32.h
  132. +136 −44 src/events/scancodes_xfree86.h
  133. +2 −0 src/file/cocoa/SDL_rwopsbundlesupport.m
  134. +1 −0 src/haptic/SDL_haptic.c
  135. +26 −0 src/haptic/SDL_haptic_c.h
  136. +0 −2 src/haptic/linux/SDL_syshaptic.c
  137. +41 −41 src/haptic/nds/SDL_syshaptic.c
  138. +4 −0 src/joystick/SDL_joystick_c.h
  139. +106 −0 src/joystick/android/SDL_sysjoystick.c
  140. +7 −7 src/joystick/bsd/SDL_sysjoystick.c
  141. +23 −23 src/joystick/nds/SDL_sysjoystick.c
  142. +4 −1 src/main/dummy/SDL_dummy_main.c
  143. +1 −0 src/main/win32/SDL_win32_main.c
  144. +74 −0 src/stdlib/SDL_string.c
  145. +2 −8 src/thread/SDL_thread.c
  146. +2 −2 src/thread/win32/SDL_syssem.c
  147. +1 −0 src/timer/SDL_systimer.h
  148. +1 −0 src/timer/unix/SDL_systimer.c
  149. +1 −0 src/video/SDL_blit_slow.c
  150. +76 −0 src/video/SDL_clipboard.c
  151. +13 −8 src/video/SDL_renderer_gles.c
  152. +1 −1 src/video/SDL_renderer_sw.c
  153. +10 −8 src/video/SDL_stretch.c
  154. +1 −1 src/video/SDL_surface.c
  155. +10 −4 src/video/SDL_sysvideo.h
  156. +9 −15 src/video/SDL_video.c
  157. +85 −0 src/video/android/SDL_androidevents.c
  158. +29 −0 src/video/android/SDL_androidevents.h
  159. +96 −0 src/video/android/SDL_androidgl.c
  160. +344 −0 src/video/android/SDL_androidrender.c
  161. +28 −0 src/video/android/SDL_androidrender.h
  162. +166 −0 src/video/android/SDL_androidvideo.c
  163. +31 −0 src/video/android/SDL_androidvideo.h
  164. +37 −0 src/video/cocoa/SDL_cocoaclipboard.h
  165. +140 −0 src/video/cocoa/SDL_cocoaclipboard.m
  166. +7 −1 src/video/cocoa/SDL_cocoaevents.m
  167. +46 −62 src/video/cocoa/SDL_cocoakeyboard.m
  168. +1 −1 src/video/cocoa/SDL_cocoamodes.m
  169. +11 −27 src/video/cocoa/SDL_cocoamouse.m
  170. +1 −1 src/video/cocoa/SDL_cocoaopengl.m
  171. +2 −2 src/video/cocoa/SDL_cocoavideo.h
  172. +5 −1 src/video/cocoa/SDL_cocoavideo.m
  173. +14 −0 src/video/cocoa/SDL_cocoawindow.h
  174. +117 −40 src/video/cocoa/SDL_cocoawindow.m
  175. +83 −49 src/video/directfb/SDL_DirectFB_WM.c
  176. +2 −2 src/video/directfb/SDL_DirectFB_WM.h
  177. +2 −1 src/video/directfb/SDL_DirectFB_dyn.c
  178. +118 −98 src/video/directfb/SDL_DirectFB_events.c
  179. +97 −111 src/video/directfb/SDL_DirectFB_modes.c
  180. +1 −1 src/video/directfb/SDL_DirectFB_modes.h
  181. +20 −0 src/video/directfb/SDL_DirectFB_mouse.c
  182. +87 −35 src/video/directfb/SDL_DirectFB_opengl.c
  183. +7 −0 src/video/directfb/SDL_DirectFB_opengl.h
  184. +51 −42 src/video/directfb/SDL_DirectFB_render.c
  185. +8 −5 src/video/directfb/SDL_DirectFB_video.c
  186. +29 −34 src/video/directfb/SDL_DirectFB_video.h
  187. +68 −55 src/video/directfb/SDL_DirectFB_window.c
  188. +3 −3 src/video/directfb/SDL_DirectFB_window.h
  189. +2 −2 src/video/pandora/SDL_pandora.h
  190. +2 −1 src/video/uikit/SDL_uikitappdelegate.m
  191. +7 −1 src/video/uikit/SDL_uikitopengles.m
  192. +12 −9 src/video/uikit/SDL_uikitview.h
  193. +131 −92 src/video/uikit/SDL_uikitview.m
  194. +1 −1 src/video/uikit/jumphack.c
  195. +1 −1 src/video/uikit/jumphack.h
  196. +2 −0 src/video/win32/SDL_ceddrawrender.c
  197. +2 −0 src/video/win32/SDL_d3drender.c
  198. +1,121 −510 src/video/win32/SDL_gapirender.c
  199. +5 −1 src/video/win32/SDL_gapirender.h
  200. +0 −97 src/video/win32/SDL_gapirender_c.h
  201. +31 −0 src/video/win32/SDL_gdirender.c
  202. +169 −0 src/video/win32/SDL_win32clipboard.c
  203. +37 −0 src/video/win32/SDL_win32clipboard.h
  204. +88 −197 src/video/win32/SDL_win32events.c
  205. +0 −1 src/video/win32/SDL_win32events.h
  206. +884 −10 src/video/win32/SDL_win32keyboard.c
  207. +7 −1 src/video/win32/SDL_win32keyboard.h
  208. +8 −1 src/video/win32/SDL_win32modes.c
  209. +0 −168 src/video/win32/SDL_win32mouse.c
  210. +41 −36 src/video/win32/SDL_win32video.c
  211. +90 −16 src/video/win32/SDL_win32video.h
  212. +52 −145 src/video/win32/SDL_win32window.c
  213. +9 −0 src/video/win32/SDL_win32window.h
  214. +0 −237 src/video/win32/wactab/pktdef.h
  215. +0 −866 src/video/win32/wactab/wintab.h
  216. +0 −136 src/video/win32/wactab/wintabx.h
  217. +2 −2 src/video/win32/wmmsg.h
  218. +128 −0 src/video/x11/SDL_eventtouch.c
  219. +43 −0 src/video/x11/SDL_eventtouch.h
  220. +156 −0 src/video/x11/SDL_x11clipboard.c
  221. +33 −0 src/video/x11/SDL_x11clipboard.h
  222. +12 −0 src/video/x11/SDL_x11dyn.h
  223. +267 −100 src/video/x11/SDL_x11events.c
  224. +4 −8 src/video/x11/SDL_x11keyboard.c
  225. +4 −4 src/video/x11/SDL_x11modes.c
  226. +0 −125 src/video/x11/SDL_x11mouse.c
  227. +14 −16 src/video/x11/SDL_x11opengl.c
  228. +1,520 −306 src/video/x11/SDL_x11render.c
  229. +51 −5 src/video/x11/SDL_x11sym.h
  230. +91 −3 src/video/x11/SDL_x11video.c
  231. +28 −2 src/video/x11/SDL_x11video.h
  232. +247 −169 src/video/x11/SDL_x11window.c
  233. +1 −0 src/video/x11/SDL_x11window.h
  234. +3 −3 test/Makefile.in
  235. +2 −2 test/automated/testsdl.c
  236. +5 −4 test/checkkeys.c
  237. +96 −18 test/common.c
  238. +1 −0 test/common.h
  239. +297 −0 test/testgesture.c
  240. +72 −17 test/testime.c
  241. +8 −12 test/testintersections.c
  242. +0 −67 test/testmmousetablet.c
@@ -14,7 +14,19 @@ build
build-deps
VisualC
VisualCE
Xcode
# for Xcode
*.orig
*.swp
*.tmp
*.rej
*~
*.o
*.mode1*
*.model*
*.perspective*
*.perspective*
*.pbxuser
(^|/)build($|/)
.DS_Store
sdl.pc
include/SDL_config.h
@@ -32,52 +44,53 @@ test/stderr.txt
test/checkkeys
test/graywin
test/loopwave
test/testpower
test/testalpha
test/testatomic
test/testaudioinfo
test/testbitmap
test/testblitspeed
test/testcdrom
test/testcursor
test/testdraw2
test/testdyngl
test/testdyngles
test/testerror
test/testeyes
test/testfile
test/testfill
test/testgamma
test/testgesture
test/testgl
test/testgl2
test/testgles
test/testhaptic
test/testhread
test/testiconv
test/testime
test/testintersections
test/testjoystick
test/testkeys
test/testloadso
test/testlock
test/testmmousetablet
test/testmultiaudio
test/testoverlay
test/testoverlay2
test/testpalette
test/testplatform
test/testpower
test/testresample
test/testsem
test/testsprite
test/testsprite2
test/testspriteminimal
test/testtimer
test/testver
test/testvidinfo
test/testwin
test/testwm
test/testwm2
test/threadwin
test/torturethread
test/testloadso
test/testgl2
test/testcursor
test/testwm2
test/testmultiaudio
test/testresample
test/testdraw2
test/testmmousetablet
test/testdyngles
test/testaudioinfo
test/testgles
test/testsprite2
test/testintersections
test/testhaptic
test/testime
test/testatomic
test/testspriteminimal
test/testfill
test/testeyes
test/*.exe
test/*.dSYM
@@ -0,0 +1,52 @@
# Makefile to build the SDL library

include ./android/config.cfg #get ANDROID_NDK

TOOLS_PATH=$(ANDROID_NDK)/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin
ANDROID_INCLUDES = -I$(ANDROID_NDK)/build/platforms/android-4/common/include \
-I$(ANDROID_NDK)/build/platforms/android-4/arch-arm/usr/include
INCLUDE = -I./include
CFLAGS = -g -O2 $(INCLUDE) $(ANDROID_INCLUDES) -DANDROID -DANDROID_NDK -static

AR = $(TOOLS_PATH)/arm-eabi-ar
RANLIB = $(TOOLS_PATH)/arm-eabi-ranlib
CC = $(TOOLS_PATH)/arm-eabi-gcc


CONFIG_H = include/SDL_config.h
TARGET = libSDL.a
SOURCES = \
src/*.c \
src/audio/*.c \
src/cpuinfo/*.c \
src/events/*.c \
src/file/*.c \
src/joystick/*.c \
src/haptic/*.c \
src/stdlib/*.c \
src/thread/*.c \
src/timer/*.c \
src/video/*.c \
src/power/*.c \
src/audio/android/*.c \
src/video/android/*.c \
src/joystick/android/*.c \
src/haptic/dummy/*.c \
src/atomic/dummy/*.c \
src/thread/pthread/*.c \
src/timer/unix/*.c \
src/loadso/dummy/*.c \

OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')

all: $(TARGET)

$(TARGET): $(CONFIG_H) $(OBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@

$(CONFIG_H):
cp $(CONFIG_H).default $(CONFIG_H)

clean:
rm -f $(TARGET) $(OBJECTS)
@@ -44,7 +44,7 @@ EMBEDSPU = @EMBEDSPU@

DIST = acinclude autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl-config.in sdl.m4 sdl.pc.in SDL.spec SDL.spec.in src test TODO VisualC.html VisualC VisualCE Watcom-Win32.zip WhatsNew Xcode Xcode-iPhoneOS

HDRS = SDL.h SDL_assert.h SDL_atomic.h SDL_audio.h SDL_compat.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_haptic.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_opengles.h SDL_pixels.h SDL_platform.h SDL_power.h SDL_quit.h SDL_rect.h SDL_revision.h SDL_rwops.h SDL_scancode.h SDL_shape.h SDL_stdinc.h SDL_surface.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h
HDRS = SDL.h SDL_assert.h SDL_atomic.h SDL_audio.h SDL_clipboard.h SDL_compat.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_gesture.h SDL_haptic.h SDL_input.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_opengles.h SDL_pixels.h SDL_platform.h SDL_power.h SDL_quit.h SDL_rect.h SDL_revision.h SDL_rwops.h SDL_scancode.h SDL_shape.h SDL_stdinc.h SDL_surface.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_touch.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h

LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
@@ -12,14 +12,15 @@ CFLAGS = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp

TARGET = libSDL.a

SOURCES = ./src/*.c ./src/audio/*.c ./src/cdrom/*.c ./src/cpuinfo/*.c ./src/events/*.c \
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
./src/joystick/*.c ./src/haptic/*.c ./src/power/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c ./src/audio/dma/*.c \
./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c ./src/cdrom/dummy/*.c \
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o ./src/video/x11/*.c
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \
./src/atomic/linux/*.c \
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o ./src/video/x11/*.c


OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
@@ -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

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

./testgl

@@ -0,0 +1,45 @@
================================================================================
Simple DirectMedia Layer for Android
================================================================================

Requirements: Android NDK r4 or later

================================================================================
How the port works
================================================================================

- Android applications are Java-based, optionally with parts written in C
- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to
the SDL library
- This means that your application C code must be placed inside an android
Java project, along with some C support code that communicates with Java
- This eventually produces a standard Android .apk package






================================================================================
Building an app
================================================================================

Instructions:
1. Edit android/config.cfg to point to the location of the NDK
2. Run 'make -f Makefile.android'. If all goes well, libsdl.a should be created
3. Place your application source files in android/project/jni
4. Edit the Android.mk to include your source files
5. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
6. Run 'ant' in android/testproject. This compiles the .java and eventually
creates a .apk with the C source embedded
7. 'ant install' will push the apk to the device or emulator (if connected)




================================================================================
Known issues
================================================================================

- SDL audio (although it's mostly written, just not working properly yet)
- TODO. I'm sure there's a bunch more stuff I haven't thought of
@@ -0,0 +1,72 @@
===========================================================================
Dollar Gestures
===========================================================================
SDL Provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures.

Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up.

Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID.

Recording:
----------
To begin recording on a touch device call:
SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices.

Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event.
A SDL_DOLLARRECORD event is a dgesture with the following fields:

event.dgesture.touchId - the Id of the touch used to record the gesture.
event.dgesture.gestureId - the unique id of the recoreded gesture.


Performing:
-----------
As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields:

event.dgesture.touchId - the Id of the touch which performed the gesture.
event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke.
event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match.
event.dgesture.numFingers - the number of fingers used to draw the stroke.

Most programs will want to define an appropriate error threshold and check to be sure taht the error of a gesture is not abnormally high (an indicator that no gesture was performed).



Saving:
-------
To save a template, call SDL_SaveDollarTemplate(gestureId, src) where gestureId is the id of the gesture you want to save, and src is an SDL_RWops pointer to the file where the gesture will be stored.

To save all currently loaded templates, call SDL_SaveAllDollarTemplates(src) where source is an SDL_RWops pointer to the file where the gesture will be stored.

Both functions return the number of gestures sucessfully saved.


Loading:
--------
To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file.

SDL_LoadDollarTemplates returns the number of templates sucessfully loaded.



===========================================================================
Multi Gestures
===========================================================================
SDL provides simple support for pinch/rotate/swipe gestures.
Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields:

event.mgesture.touchId - the Id of the touch on which the gesture was performed.
event.mgesture.x - the normalized x cooridinate of the gesture. (0..1)
event.mgesture.y - the normalized y cooridinate of the gesture. (0..1)
event.mgesture.dTheta - the amount that the fingers rotated during this motion.
event.mgesture.dDist - the amount that the fingers pinched during this motion.
event.mgesture.numFingers - the number of fingers used in the gesture.


===========================================================================
Notes
===========================================================================
For a complete example see test/testgesture.c

Please direct questions/comments to:
jim.tla+sdl_touch@gmail.com
@@ -33,14 +33,6 @@ Here is a more manual method:
4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically.
5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code.

==============================================================================
Notes -- Touch Input
==============================================================================

Touch input in SDL for iPhone OS is presently exposed through SDL's mouse input API. Multi-touch input is reported as multiple mice, with each touch associated with a specific mouse. This association stays coherent from the time the touch starts to the time a touch ends.

By default, multi-touch is turned ON. This requires some care, because if you simply respond to mouse events without checking which mouse caused the event, you may end up fetching data from the wrong mouse, ie, from an incorrect or invalid touch. To turn multi-touch OFF, you can recompile SDL for iPhone with the macro SDL_IPHONE_MULTIPLE_MICE (found in SDL_config_iphoneos.h) set to 0.

==============================================================================
Notes -- Accelerometer as Joystick
==============================================================================
@@ -55,7 +47,7 @@ Notes -- OpenGL ES

Your SDL application for iPhone uses OpenGL ES for video by default.

OpenGL ES for iPhone supports two display pixel formats, RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute.
OpenGL ES for iPhone supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute.

If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0.

0 comments on commit 7de0704

Please sign in to comment.