SDL/include
Ryan C. Gordon 41af118d8b The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]

I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.

The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:

export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib

It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)


Here are the new configure targets:
   --enable-video-cocoa    use Cocoa/Quartz video driver default=yes
   --enable-video-carbon   use Carbon/QuickDraw video driver default=yes
   --enable-video-x11	   use X11 video driver default=no

./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
	     --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib

The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)

If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.

I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?

And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.


Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch

--anders

PS. It says "video", but as usual it applies to mouse/keyboard too.


------


To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch

Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.

http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
2005-09-08 06:16:14 +00:00
..
.cvsignore Initial revision 2001-04-26 16:45:43 +00:00
begin_code.h Avoid gcc parse errors on Win32. This is fine in general because gcc uses 2005-01-08 23:13:01 +00:00
close_code.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
Makefile.am Added SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE() in SDL_cpuinfo.h 2003-11-18 01:27:06 +00:00
SDL_active.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_audio.h Date: Fri, 20 Aug 2004 08:31:20 +0200 2004-08-20 18:57:01 +00:00
SDL_byteorder.h Date: Wed, 13 Oct 2004 17:00:58 -0500 2004-11-12 22:09:17 +00:00
SDL_cdrom.h Added some parentheses for a little more macro safety. Recommended by Petri 2005-04-17 10:16:30 +00:00
SDL_copying.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_cpuinfo.h Fixed bugs in CPU feature detection and added extended feature detection 2004-01-24 05:47:19 +00:00
SDL_endian.h Optimize also for 68020 and higher CPUs 2005-03-30 12:38:03 +00:00
SDL_error.h Updated for Visual C++ 6 build 2004-11-15 23:34:56 +00:00
SDL_events.h Date: Fri, 20 Aug 2004 08:31:20 +0200 2004-08-20 18:57:01 +00:00
SDL_getenv.h Explicitly specify the SDL API calling convention (C by default) 2002-04-11 14:35:16 +00:00
SDL_joystick.h Date: Wed, 7 Jul 2004 12:57:58 +0200 2004-07-18 19:05:06 +00:00
SDL_keyboard.h Date: Mon, 3 May 2004 03:15:01 +0100 2004-07-18 22:57:40 +00:00
SDL_keysym.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_loadso.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_main.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_mouse.h Added some parentheses for a little more macro safety. Recommended by Petri 2005-04-17 10:16:30 +00:00
SDL_mutex.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_name.h Added a new header file: SDL_loadso.h 2002-03-06 05:20:11 +00:00
SDL_opengl.h Use the canonical glext.h on MacOS X as well (#define NO_SDL_GLEXT if you don't want this) 2004-08-20 22:32:05 +00:00
SDL_quit.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_rwops.h Date: Fri, 20 Aug 2004 08:31:20 +0200 2004-08-20 18:57:01 +00:00
SDL_syswm.h The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails: 2005-09-08 06:16:14 +00:00
SDL_thread.h Date: Fri, 20 Aug 2004 08:31:20 +0200 2004-08-20 18:57:01 +00:00
SDL_timer.h Fix various problems with the timer code. 2005-01-13 23:24:56 +00:00
SDL_types.h *** empty log message *** 2004-07-21 04:53:26 +00:00
SDL_version.h Added some parentheses for a little more macro safety. Recommended by Petri 2005-04-17 10:16:30 +00:00
SDL_video.h Allow SDL to be loaded by Matlab 2005-01-02 05:11:16 +00:00
SDL.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00