View Full Version : SDL got pretty slow on Tiger?
Zeeke
2005.05.08, 05:36 AM
Hey,
my game is using standard SDL-Video for graphics (and I can't change it to OpenGL). Under OS X Panther I had about 70fps, that was ok. But now under Tiger I've just about 25fps... and that's not really nice.
Any ideas why? Did Apple change something so that SDL just needs to get modified to work well again?
Ciao, Michael
ps. My Mac is a Mac mini with 1.42GHz.
pps. My version of SDL is 1.2.8.
OneSadCookie
2005.05.08, 05:59 AM
Use OpenGL for graphics. Anything else is guaranteed to be slow.
Fenris
2005.05.08, 08:02 AM
Barring Keith's valid but tough advice, try running Shark on it and see what takes up the time. If you still have access to a Mac with pre-Tiger, Shark it there too and check out the difference. Post back and we'll help you! :)
Skorche
2005.05.09, 03:13 AM
Don't suppose it's possible that the screen pixel format has changed, you are converting all surfaces to the screen native format right?
I noticed a huge slowdown with quartz extreme in 10.2, SDL didn't play well with it. (at least not on my machine.) Could Tiger have made that worse?
socksy
2005.05.09, 03:50 PM
Is their any chance of SDL getting faster again when the developers optimise it for tiger? Or if they do?
I'm planning on doing a few projects in SDL and I want tiger at some point...
Duane
2005.05.09, 04:09 PM
what is this Shark? i've heard of it, and it sounds useful... where can I get it?
hokan
2005.05.09, 05:08 PM
It may have something to do with changes in how Tiger does hardware accelerated 2D, here's a long artical that touches open these changes (among a lot of other things):
http://arstechnica.com/reviews/os/macosx-10.4.ars/14
MarkJ
2005.05.09, 07:05 PM
Shark is basically a fancier, more Apple brand-like version of Sampler, the Developer Tool that came with Jaguar. Basically it samples your application every few cycles to see what function it's in, and it'll tell you what areas of your code that you spend the most time in.
If you're developing a game, you're probably spending the bulk of your time drawing things to the screen, and Sampler or Shark can help guide you to the parts you need to concentrate your optimization efforts on.
Shark comes with the Panther/Tiger Developer Tools, but if you don't have that handy, I believe you can download them from Apple directly if you have a free ADC account.
OneSadCookie
2005.05.09, 07:10 PM
Shark is rather different from Sampler, in rather crucial ways :p
Shark is part of the CHUD tools, which you can get from here: http://developer.apple.com/tools/download/
Joseph Duchesne
2005.05.09, 10:47 PM
yeah, I had that problem too. SDL was going around 60fps and now it's 20. This sucks. I wonder what is slowing it down?
Puzzler183
2005.05.09, 11:02 PM
I'll definitely have to also suggest OpenGL. Hardware blending support plus a bunch of other 3D goodies for free (Z and stencil buffering, arbitrary 2D and 3D transforms, lighting/shaders if you want them, simple multitexturing, etc.)
Joseph Duchesne
2005.05.09, 11:25 PM
I use SDL for keyboard input and to set up the window for openGL. "Switching" is hardly an option because I like SDL's cross platform nature, and there is really no other option in C. (yeah, I know. Use ojbC and cocoa...)
OneSadCookie
2005.05.09, 11:33 PM
Wait, you're getting lower OpenGL frameworks with SDL on Tiger?
That seems a little unlikely...
lightbringer
2005.05.10, 12:33 AM
Wait, you're getting lower OpenGL frameworks with SDL on Tiger?
That seems a little unlikely...
*framerates
*framerates
Ah, that makes a bit more sense.
OneSadCookie
2005.05.10, 01:11 AM
doh!
hmm, I wonder what I had on the mind at the time?!
PowerMacX
2005.05.10, 10:22 PM
doh!
hmm, I wonder what I had on the mind at the time?!
Perhaps you were worried that we may discover your secret?
http://www.idevgames.com/forum/showthread.php?t=9077
Ok... maybe not :p
Kevin Lindeman
2005.06.05, 04:29 AM
While it isn't speed related, I have noticed that the newer version of the SDLMain.m file that surfaced around uDG last year has some compile problems under Tiger. It looks like a method name changed or something. It generates 5 warnings, one complaining about a pointer, "no '-setApplicationMenu:' method found, and some other stuff. This is with SDL 1.2.8. Anyone else had this issue? There were no errors, luckilly.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.