[SDL] Re: Mac OS X Video Drivers [patch]

Anders F Björklund afb at algonet.se
Wed Jun 1 05:12:46 PDT 2005


Asko Kauppi wrote:

> To confuse people even more (hopefully not?) using Cocoa does not  
> necessarily imply you need to touch Objective-C.  I don't, and  there's 
> been no (major) issues with running SDL on Mac OS X.  Works  fine. :)

Right, I actually meant when hacking SDL internals and the video driver.

As long as you just *use* the lib, it doesn't matter all that much...
The only thing is that you need to link to Cocoa.framework (and -lobjc),
and that you get into a world of hurt if trying to mix with alternate
languages that have their own runtime requirements, like the D language.

For some reason the libSDLmain.a is missing from the binary/PKG dist,
and using the SDLMain.m source directly is advocated instead ? (ugh)
(and you need to add all the needed CFLAGS yourself to your projects:
e.g. -I/Library/Frameworks/SDL.framework/Headers and -framework SDL)

But when compiling it yourself, you do get sdl-config and libSDLmain.a.
Maybe one day the PKG installer will be fixed and install those two too?

> What I'd like to get, however, is the CVS Altivec optimizations in a
> official release. I know.. it will happen "some day". Currently, the SDL
> performance on OS X is much, much less than it could be (~30fps where
> Windows/Linux runs about twice the speed, on comparable machine).*

Make sure you compare the fullscreen performance, otherwise Quartz
will interfere with the screen updates (double buffering and "smarts",
where it combines your small delta update rects into a few huge ones)

It's nice if software blitting has "fair" performance on Mac OS X too,
but the *only* way to make it fast is to use OpenGL (which is built-in).
Fortunately, it's not hard to accomplish (I'm doing it in SpriteWorld X)

--anders





More information about the SDL mailing list