Respecting SDL_Flip()

On both X11 and Win32, the SDL port seems to respect SDL_Flip() and not
update the main surface until the SDL_Flip() function is called. On
DirectFB, however, SDL_Flip is not required to update the screen. Is
there anyway to disable this behavior or do I simply have to have a
scratch surface in which to do my drawing and then blit that scratch
surface to the screen only when drawing is complete?–
Chris Thielen
@Christopher_Thielen

“Chris” wrote in message
news:mailman.1021246443.20585.sdl at libsdl.org

On both X11 and Win32, the SDL port seems to respect SDL_Flip() and
not
update the main surface until the SDL_Flip() function is called. On
DirectFB, however, SDL_Flip is not required to update the screen. Is
there anyway to disable this behavior or do I simply have to have a
scratch surface in which to do my drawing and then blit that scratch
surface to the screen only when drawing is complete?

SDL_Flip or similar is required when you either have a software video
surface or you have hardware page flipping. You can always force a
software video surface when hardware page flipping is not available.
Or you can manually create a virtual screen surface and blit that to
the real video surface wherever you would otherwise use ‘SDL_Flip’.–
Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com

If that’s happening, then it would appear you aren’t using double-buffering.> ----- Original Message -----

From: chris@luethy.net (Christopher Thielen)
To:
Sent: Sunday, May 12, 2002 6:31 PM
Subject: [SDL] respecting SDL_Flip()

On both X11 and Win32, the SDL port seems to respect SDL_Flip() and not
update the main surface until the SDL_Flip() function is called. On
DirectFB, however, SDL_Flip is not required to update the screen. Is
there anyway to disable this behavior or do I simply have to have a
scratch surface in which to do my drawing and then blit that scratch
surface to the screen only when drawing is complete?


Chris Thielen
chris at luethy.net


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

Is software mode always double buffered?On Thu, 2002-05-16 at 09:14, JASON E HOFFOSS wrote:

If that’s happening, then it would appear you aren’t using double-buffering.

----- Original Message -----
From: “Chris” <@Christopher_Thielen>
To:
Sent: Sunday, May 12, 2002 6:31 PM
Subject: [SDL] respecting SDL_Flip()

On both X11 and Win32, the SDL port seems to respect SDL_Flip() and not
update the main surface until the SDL_Flip() function is called. On
DirectFB, however, SDL_Flip is not required to update the screen. Is
there anyway to disable this behavior or do I simply have to have a
scratch surface in which to do my drawing and then blit that scratch
surface to the screen only when drawing is complete?


Chris Thielen
@Christopher_Thielen


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


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


Chris
@Christopher_Thielen

Software mode is never double buffered, so far as I am aware.> ----- Original Message -----

From: chris@luethy.net (Christopher Thielen)
To:
Sent: Thursday, May 16, 2002 9:12 AM
Subject: Re: [SDL] respecting SDL_Flip()

Is software mode always double buffered?

On Thu, 2002-05-16 at 09:14, JASON E HOFFOSS wrote:

If that’s happening, then it would appear you aren’t using
double-buffering.

----- Original Message -----
From: “Chris”
To:
Sent: Sunday, May 12, 2002 6:31 PM
Subject: [SDL] respecting SDL_Flip()

On both X11 and Win32, the SDL port seems to respect SDL_Flip() and
not

update the main surface until the SDL_Flip() function is called. On
DirectFB, however, SDL_Flip is not required to update the screen. Is
there anyway to disable this behavior or do I simply have to have a
scratch surface in which to do my drawing and then blit that scratch
surface to the screen only when drawing is complete?


Chris Thielen
chris at luethy.net


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


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


Chris
chris at luethy.net


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

“Rob Sadedin” wrote in message
news:mailman.1021507690.30110.sdl at libsdl.org

Software mode is never double buffered, so far as I am aware.

Software mode is double buffered by definition. 'SDL_DOUBLEBUF’
implies a backbuffer in video memory and is therefore incompatable
with software mode, which uses a backbuffer in system memory. Both
can be correctly called “double buffering”. Both require 'SDL_Flip’
or ‘SDL_Update*’ before anything appears on the screen.–
Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com

So, if you want video surfaces if available but want to fall back to
software ones in a graceful way without much effort,
SDL_HWSURFACE|SDL_DOUBLEBUF is the thing to do, right?On Wed, May 15, 2002 at 06:59:56PM -0600, Rainer Deyke wrote:

Software mode is double buffered by definition. 'SDL_DOUBLEBUF’
implies a backbuffer in video memory and is therefore incompatable
with software mode, which uses a backbuffer in system memory. Both
can be correctly called “double buffering”. Both require 'SDL_Flip’
or ‘SDL_Update*’ before anything appears on the screen.


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

“Matthew Miller” wrote in message
news:mailman.1021512725.565.sdl at libsdl.org

Software mode is double buffered by definition. 'SDL_DOUBLEBUF’
implies a backbuffer in video memory and is therefore incompatable
with software mode, which uses a backbuffer in system memory.
Both

can be correctly called “double buffering”. Both require
’SDL_Flip’

or ‘SDL_Update*’ before anything appears on the screen.

So, if you want video surfaces if available but want to fall back to
software ones in a graceful way without much effort,
SDL_HWSURFACE|SDL_DOUBLEBUF is the thing to do, right?

Falling back to software is no problem, but unfortunately
’SDL_HWSURFACE|SDL_DOUBLEBUF’ can also fall back to 'SDL_HWSURFACE’
without ‘SDL_DOUBLEBUF’, which is the only flag combination that
actually has no double buffering. If you want to avoid this, you’re
basically stuck with either doing double buffering by hand, or
explicitly checking for the availability of ‘SDL_DOUBLEBUF’ and
requesting a software surface if it isn’t available.> On Wed, May 15, 2002 at 06:59:56PM -0600, Rainer Deyke wrote:


Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com

That’s exactly what I was wondering. Thanks.On Wed, May 15, 2002 at 09:17:34PM -0600, Rainer Deyke wrote:

Falling back to software is no problem, but unfortunately
’SDL_HWSURFACE|SDL_DOUBLEBUF’ can also fall back to 'SDL_HWSURFACE’
without ‘SDL_DOUBLEBUF’, which is the only flag combination that
actually has no double buffering. If you want to avoid this, you’re
basically stuck with either doing double buffering by hand, or
explicitly checking for the availability of ‘SDL_DOUBLEBUF’ and
requesting a software surface if it isn’t available.


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

the SDL_VideoInfo page in the api reference looks great to check for a
lot of things, but how do you check to see if DOUBLEBUF is available? It
looks like it has a lot of functions for hardware surfaces, window
manager, and checking whether various software/hardware alpha/colorkey
combinations are accelerated, but how would I check to see if DOBULEBUF
is available?

thanks.On Wed, 2002-05-15 at 20:17, Rainer Deyke wrote:

“Matthew Miller” wrote in message
news:mailman.1021512725.565.sdl at libsdl.org

On Wed, May 15, 2002 at 06:59:56PM -0600, Rainer Deyke wrote:

Software mode is double buffered by definition. 'SDL_DOUBLEBUF’
implies a backbuffer in video memory and is therefore incompatable
with software mode, which uses a backbuffer in system memory.
Both

can be correctly called “double buffering”. Both require
’SDL_Flip’

or ‘SDL_Update*’ before anything appears on the screen.

So, if you want video surfaces if available but want to fall back to
software ones in a graceful way without much effort,
SDL_HWSURFACE|SDL_DOUBLEBUF is the thing to do, right?

Falling back to software is no problem, but unfortunately
’SDL_HWSURFACE|SDL_DOUBLEBUF’ can also fall back to 'SDL_HWSURFACE’
without ‘SDL_DOUBLEBUF’, which is the only flag combination that
actually has no double buffering. If you want to avoid this, you’re
basically stuck with either doing double buffering by hand, or
explicitly checking for the availability of ‘SDL_DOUBLEBUF’ and
requesting a software surface if it isn’t available.


Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com


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


Chris
@Christopher_Thielen

“Chris” wrote in message
news:mailman.1021556108.22334.sdl at libsdl.org

the SDL_VideoInfo page in the api reference looks great to check for
a
lot of things, but how do you check to see if DOUBLEBUF is
available? It
looks like it has a lot of functions for hardware surfaces, window
manager, and checking whether various software/hardware
alpha/colorkey
combinations are accelerated, but how would I check to see if
DOBULEBUF
is available?

One easy way: try to set the display mode with
’SDL_HWSURFACE|SDL_DOUBLEBUF’. Check if the display surface’s 'flags’
has ‘SDL_DOUBLEBUF’. If not, ‘SDL_DOUBLEBUF’ is not available at that
resolution/color depth.–
Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com