Problems with fullscreen mode in windows

I have a program and it runs pretty good in Linux in window mode and
fullscreen mode. In Windows it runs at 40 fps in window mode but only at
10fps in fullscreen mode.

Does anyone know why there is so much difference between the two modes
in Windows? Can it be because i am doing something wrong?

Thanks

Lorenzo

Most likely the difference is that the fullscreen mode on Windows
is using hardware surface, while fullscreen mode on Linux (X11) is
still software surface as in all window mode.

Regards,
.Paul.On Mon, May 13, 2002 at 11:04:06PM -0700, Lorenzo Gil-Sanchez wrote:

I have a program and it runs pretty good in Linux in window mode and
fullscreen mode. In Windows it runs at 40 fps in window mode but only at
10fps in fullscreen mode.

Does anyone know why there is so much difference between the two modes
in Windows? Can it be because i am doing something wrong?

Thanks

Lorenzo


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

Why would that make it slower on Windows with fullscreen? Shouldn’t a HW
surface be significantly faster?

(PS – top posting = bad – it makes it hard to follow the flow of
discussion in situations like this. I’ve rearraged the quoting to fix this,
but in the future, please respect netiquette, even in these degenerate
cyber-times…)On Tue, May 14, 2002 at 02:41:20PM +0800, paul at theV.net wrote:

On Mon, May 13, 2002 at 11:04:06PM -0700, Lorenzo Gil-Sanchez wrote:

I have a program and it runs pretty good in Linux in window mode and
fullscreen mode. In Windows it runs at 40 fps in window mode but only at
10fps in fullscreen mode.
Most likely the difference is that the fullscreen mode on Windows
is using hardware surface, while fullscreen mode on Linux (X11) is
still software surface as in all window mode.


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

I have a program and it runs pretty good in Linux in window mode and
fullscreen mode. In Windows it runs at 40 fps in window mode but only at
10fps in fullscreen mode.
Most likely the difference is that the fullscreen mode on Windows
is using hardware surface, while fullscreen mode on Linux (X11) is
still software surface as in all window mode.

Why would that make it slower on Windows with fullscreen? Shouldn't a HW
surface be significantly faster?

Not necessarily. If you’re doing lots of independent writes (like a
putpixel) or worse yet, reading from the surface, a HW surface would be
several times slower.

(PS -- top posting = bad -- it makes it hard to follow the flow of
discussion in situations like this. I've rearraged the quoting to fix this,
but in the future, please respect netiquette, even in these degenerate
cyber-times....)On Tue, 2002-05-14 at 08:27, Matthew Miller wrote:
On Tue, May 14, 2002 at 02:41:20PM +0800, paul at theV.net wrote:
> On Mon, May 13, 2002 at 11:04:06PM -0700, Lorenzo Gil-Sanchez wrote:

-- 
Matthew Miller           mattdm at mattdm.org        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>

_______________________________________________
SDL mailing list
SDL at libsdl.org

http://www.libsdl.org/mailman/listinfo/sdl

End of Rant.

Jimmy
Jimmy’s World
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020514/e22edbfd/attachment.pgp

Not necessarily. If you’re doing lots of independent writes (like a
putpixel) or worse yet, reading from the surface, a HW surface would be
several times slower.

I’m going to preempt David here and say:

Direct access to video RAM is balls slow.

You almost always want a software surface that does accelerated blits to
video RAM (or, if you can get it all into video memory and never need to
manipulate the surfaces directly, blitting from one hardware surface to
another is good, too). “hardware surface” carries the wrong connotation
for what most people need, and lots of people make this mistake.

Make a software surface, tinker with the pixels, and blit it to video RAM
from there via SDl_UpdateRect().

–ryan.

14/05/02 21.42.21, “Ryan C. Gordon” wrote:

Not necessarily. If you’re doing lots of independent writes (like a
putpixel) or worse yet, reading from the surface, a HW surface would be
several times slower.

I’m going to preempt David here and say:

Direct access to video RAM is balls slow.

You almost always want a software surface that does accelerated blits to
video RAM (or, if you can get it all into video memory and never need to
manipulate the surfaces directly, blitting from one hardware surface to
another is good, too). “hardware surface” carries the wrong connotation
for what most people need, and lots of people make this mistake.

Make a software surface, tinker with the pixels, and blit it to video RAM
from there via SDl_UpdateRect().

Yeah, but (at least in windows) blitting from a software surface to an HW screen is MUCH slower than blitting to a SW screen. Also, many libs (SDL_image or
SDL_rotozoom for example) do not support hardware surfacing. Am I wrong?

> > I have a program and it runs pretty good in Linux in window mode and
> > fullscreen mode. In Windows it runs at 40 fps in window mode but only at
> > 10fps in fullscreen mode.
> Most likely the difference is that the fullscreen mode on Windows 
> is using hardware surface, while fullscreen mode on Linux (X11) is
> still software surface as in all window mode. 

Why would that make it slower on Windows with fullscreen? Shouldn't a HW
surface be significantly faster?

Not necessarily. If you’re doing lots of independent writes (like a
putpixel) or worse yet, reading from the surface, a HW surface would be
several times slower.

I’m doing lots of blit operations because it is a 2D scroll game and I
have to scroll the terrain every frame. The terrain is composed by tiles
and every tile need a blit operation.

I try to use the SW surface and it ran 8fps faster in Windows fullscreen
mode. Thanks a lot.On Tue, 2002-05-14 at 09:20, Jimmy wrote:

On Tue, 2002-05-14 at 08:27, Matthew Miller wrote:
On Tue, May 14, 2002 at 02:41:20PM +0800, paul at theV.net wrote:
> On Mon, May 13, 2002 at 11:04:06PM -0700, Lorenzo Gil-Sanchez wrote:

(PS -- top posting = bad -- it makes it hard to follow the flow of
discussion in situations like this. I've rearraged the quoting to fix this,
but in the future, please respect netiquette, even in these degenerate
cyber-times....)

-- 
Matthew Miller           mattdm at mattdm.org        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>

_______________________________________________
SDL mailing list
SDL at libsdl.org

http://www.libsdl.org/mailman/listinfo/sdl

End of Rant.

Jimmy
Jimmy’s World