Lower fps in fullscreen (Mike Lindsey)

In Fullscreen mode SDL automatically uses Hardware Surfaces,that might be
slower if you are manipiulating Surfaces directly(f.i. SDL_Drawpixel())–
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f?r Mail, Message, More +++

All my surface manipulation so far, comes down to code like:

((unsigned int*)gScreen->pixels)[ofs + j] = c;On 5/17/05, Michael Otteneder wrote:

In Fullscreen mode SDL automatically uses Hardware Surfaces,that might be
slower if you are manipiulating Surfaces directly(f.i. SDL_Drawpixel())


5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f?r Mail, Message, More +++


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Mike

Yes, that would DEFINITELY slow things down. Video memory is accessed slower
than normal memory by the CPU; only when you do hardware-surface to
hardware-surface blitting does it give an an advantage.On May 18, 2005 02:22 pm, Mike Lindsey wrote:

All my surface manipulation so far, comes down to code like:

((unsigned int*)gScreen->pixels)[ofs + j] = c;

I’m not using SDL_Drawpixel… I’m using hardware surfaces and double
buffering. I THOUGHT it was my laptop’s drivers rescaling the
fullscreen image to the lcd’s native resolution, in software, poorly,
but I got it working on my desktop, and it’s doing the same thing…

100fps if I unlock fps from pps, windowed. ~20 or less fullscreen.

I’ve dabbled in opengl and directx a couple times before. And I used
to do a lot of assembly programming “back in the day”… And I’m not
doing anything that I wouldn’t have expected to get at least 30fps
fullscreen, on a 486. So. I’m totally baffled at the 20fps on a
2.8GHz machine, with 2gigs of ram, and a geforce 5600 with 512mb of
ram…On 5/17/05, Michael Otteneder wrote:

In Fullscreen mode SDL automatically uses Hardware Surfaces,that might be
slower if you are manipiulating Surfaces directly(f.i. SDL_Drawpixel())


5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f?r Mail, Message, More +++


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Mike

Hrm. Odd. Just added some debug routines to tell me how many ticks I
was spending in my render function. And the bug went away. Now I’m
seeing about a 10% increase in speed in fullscreen, no matter what my
display target.

At least today is my friday.On 5/26/05, Mike Lindsey <@Mike_Lindsey> wrote:

I’m not using SDL_Drawpixel… I’m using hardware surfaces and double
buffering. I THOUGHT it was my laptop’s drivers rescaling the
fullscreen image to the lcd’s native resolution, in software, poorly,
but I got it working on my desktop, and it’s doing the same thing…

100fps if I unlock fps from pps, windowed. ~20 or less fullscreen.

I’ve dabbled in opengl and directx a couple times before. And I used
to do a lot of assembly programming “back in the day”… And I’m not
doing anything that I wouldn’t have expected to get at least 30fps
fullscreen, on a 486. So. I’m totally baffled at the 20fps on a
2.8GHz machine, with 2gigs of ram, and a geforce 5600 with 512mb of
ram…

On 5/17/05, Michael Otteneder wrote:

In Fullscreen mode SDL automatically uses Hardware Surfaces,that might be
slower if you are manipiulating Surfaces directly(f.i. SDL_Drawpixel())


5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f?r Mail, Message, More +++


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Mike


Mike

I’m not using SDL_Drawpixel… I’m using hardware surfaces and double
buffering. I THOUGHT it was my laptop’s drivers rescaling the
fullscreen image to the lcd’s native resolution, in software, poorly,
but I got it working on my desktop, and it’s doing the same thing…

100fps if I unlock fps from pps, windowed. ~20 or less fullscreen.

I’ve dabbled in opengl and directx a couple times before. And I used
to do a lot of assembly programming “back in the day”… And I’m not
doing anything that I wouldn’t have expected to get at least 30fps
fullscreen, on a 486. So. I’m totally baffled at the 20fps on a
2.8GHz machine, with 2gigs of ram, and a geforce 5600 with 512mb of
ram…

Run a profiler on it to see where you are spending all your time. Also,
what is the resolution WxHxBPP of the screen and how many blits do you
do to build up each screen? I.E. what is the total bandwidth per frame
requirement?

I understand you are very experienced and don’t consider what you are
doing to be anything that should tax a 486. But, I doubt you are working
in 320x200x8 bit mode either :slight_smile: I got bit by the difference between
expectations and reality a while ago. Expectations that were set by
having written assembler rendering code for 386/486 class machines. The
newer machines are astonishingly fast, if, and only if, you are using
hardware rendering.

The sad truth is that with the set up you have, if you are doing
software rendering it can easily be as slow as you describe. Despite the
massive amount of computing power and graphics power you have, if you
are doing software rendering then you are trapped behind the speed of
the AGP bus. Which, as fast as it is, isn’t fast enough when you are
doing software writes, or heaven forbid, read/modify/write operations.
Try switching to software buffers and see what the frame rate is.

BTW, I bought a Geforce 5600, it was slower than my ancient GeForce 2
(on my applications). I took it back and got a GeForce 5700. It gave me
a dramatic improvement in speed.

	Bob PendletonOn Thu, 2005-05-26 at 15:42 -0700, Mike Lindsey wrote:

On 5/17/05, Michael Otteneder wrote:

In Fullscreen mode SDL automatically uses Hardware Surfaces,that might be
slower if you are manipiulating Surfaces directly(f.i. SDL_Drawpixel())


5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f?r Mail, Message, More +++


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


±-------------------------------------+