Fullscreen slowdown (again probably)

hi, sorry i’m sure there was something on this or similar recently on this group
but i cant find it.

i have written a game with very slack plotting routines and alot of alpha
blending.

it runs fine in windows xp windowed, but when i set if for full screen it slows
down alot, what steps do i take to rectify this?–

Nice.


This message was sent using IMP, the Internet Messaging Program.

Hello Neil,

Wednesday, August 23, 2006, 5:10:11 PM, you wrote:

hi, sorry i’m sure there was something on this or similar recently on this group
but i cant find it.

i have written a game with very slack plotting routines and alot of alpha
blending.

it runs fine in windows xp windowed, but when i set if for full screen it slows
down alot, what steps do i take to rectify this?

SDL in fullscreen will be using VSync, check your “slowdown” isn’t due
to that.

Also, if you are doing alpha blending, this probably means you are
reading from a surface. If you are, make sure that surface isn’t in
video ram or it will be slow as the AGP bus is optimised for writes,
but very slow for reads. In windowed mode, the surfaces won’t be in
video ram.–
Best regards,
Peter mailto:@Peter_Mulholland

Hello Neil,

Wednesday, August 23, 2006, 5:10:11 PM, you wrote:

hi, sorry i’m sure there was something on this or similar recently on
this group
but i cant find it.

i have written a game with very slack plotting routines and alot of
alpha
blending.

it runs fine in windows xp windowed, but when i set if for full screen
it slows
down alot, what steps do i take to rectify this?

SDL in fullscreen will be using VSync, check your “slowdown” isn’t due
to that.

Also, if you are doing alpha blending, this probably means you are
reading from a surface. If you are, make sure that surface isn’t in
video ram or it will be slow as the AGP bus is optimised for writes,
but very slow for reads. In windowed mode, the surfaces won’t be in
video ram.


Best regards,
Peter mailto:darkmatter at freeuk.com

I’m still trying to figure out if Neil meant to say “slick” instead of
"slack". :slight_smile:

Neil are you using OpenGL for the rendering?

Erik Yuzwa
Wazoo Enterprises Inc.

i have written a game with very slack plotting routines and alot of alpha
blending. it runs fine in windows xp windowed, but when i set if for full
screen it slows down alot, what steps do i take to rectify this?

SDL no longer uses DirectDraw by default which may be slowing down your
blitting. Adding this before SDL_Init() may help:

SDL_putenv(“SDL_VIDEODRIVER=directx”)

thanks, i’ll look into this later at some point,

if you want to see how slack the code is then it’s at

http://www.cloudsprinter.com/software/nuzoink/nuzoink.zip----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Quoting Ilya Olevsky :

*-> > i have written a game with very slack plotting routines and alot of
*-> alpha
*-> > blending. it runs fine in windows xp windowed, but when i set if for
*-> full
*-> > screen it slows down alot, what steps do i take to rectify this?
*->
*-> SDL no longer uses DirectDraw by default which may be slowing down your
*-> blitting. Adding this before SDL_Init() may help:
*->
*-> SDL_putenv(“SDL_VIDEODRIVER=directx”)
*->

i tried this, seems to make no change whatsoever, the other guy said something
about not hardware surfaces but software surfaces which i tried, but i’m not
entierly sure if i am doing it right----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Hello !

i tried this, seems to make no change whatsoever, the other guy said
something about not hardware surfaces but software surfaces which i tried,
but i’m not entierly sure if i am doing it right

You need to use
screen = SDL_SetVideoMode (x, y, bpp, SDL_HWPALETTE | SDL_SWSURFACE);
to make sure the screen Surface is a SW_Surface. As Alpha Blending
needs to read AND write pixels, the speed is best when
Source and Dest. Surfaces are in System Memory.

Maybe you need to use SDL_HWSURFACE to get VSYNCed DoubleBuffering
then i would create a Shadow Software Surface and in the last
step blit the SW_Surface to the HW_Surface and then do the flip.

CU