Sdl and the mac " it is slooowwww"

I trying to right a level editor program in sdl, it works fine on windows
and SuSe but on mac i get about half, in fact when there is to much going on
the FPS drops to like 2.

Does any one have any mac tips on how to make sdl apps run faster?
WE are not using opengl, just sdl._________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com

I trying to right a level editor program in sdl, it works fine on
windows and SuSe but on mac i get about half, in fact when there is to
much going on the FPS drops to like 2.

Does any one have any mac tips on how to make sdl apps run faster?

There are some general things to look out for (which I find myself
repeating often - just check the archives), but for the most part every
app has different performance issues, even on the same OS and hardware.
I’d like to say “just do this” but I’d be shooting in the dark.

What you really need to do is profile the application to figure out
where it is spending the most time. If you are using Mac OS X, open up
"Sampler" and attach your editor while it is running. You can also use
gprof on OS X if you are familiar with that. From that info you will
likely get a good idea of where the bottleneck is. On Mac OS 9 you’ll
have to use CodeWarrior’s built-in profiling support (check the
documentation for details on this).

Let us know what you find…

-DOn Friday, August 30, 2002, at 07:00 PM, JC Santiago wrote:

— JC Santiago wrote:

Does any one have any mac tips on how to make sdl apps run faster?
WE are not using opengl, just sdl.

Well, the first thing I’d need to know is how you’re drawing. Are you
painting the entire screen every frame? A level editor only really
needs to draw one tile at any given time, and perhaps update a few
controls. The rest of the time there doesn’t need to be any drawing
except on scrolls.

As for framerate, are you doing your own double-buffering? If so, and
you’re in windowed mode, you’re burning a lot of time. OS X does its
own double-buffering for windows, so just drawing directly to the
screen and using SDL_Flip(screen) works rather well.

Other problems: Quartz is notoriously slow in 10.1. I just upgraded to
10.2 last night, and between that and gcc 3.1 I think programmers are
going to see a marked improvement in framerates. Oh, and I’ve noticed
that screen draws in OS X seem to be faster the higher the bitdepth
(I haven’t figured this out).

The last solution to make would be to do your editor full-screen. OS X
fullscreen mode is blazingly fast.