Something I've been wondering

There has been something I’ve been wondering about SDL, why isn’t there
a function to wait for the verticle retrace? Or does
SDL_UpdateRect/SDL_Flip do this? I don’t know if DirectX games do this,
but I remember using it a lot when I programmed in DOS.–
-= aaron p. matthews
-= rival entertainment
-= http://www.Nayzak.com/~jerryma/rival

At 05:10 PM 10/24/99 -0700, you wrote:

There has been something I’ve been wondering about SDL, why isn’t there a
function to wait for the verticle retrace? Or does
SDL_UpdateRect/SDL_Flip do
this? I don’t know if DirectX games do this, but I remember using it a?lot
when I programmed in DOS.

I think whenever you do a flip() with a back buffer or in a window it

automatically waits for the retrace.

-Mongoose WPI student majoring in Computer Science
This messge sent from Windoze… ugh.

The IDirectDrawSurface::Flip method waits for the vertical
retrace. It doesn’t block the caller though, just queues the flip and
returns. The X part I don’t know.On 24 Oct 99, at 17:10, rival games wrote:

There has been something I’ve been wondering about SDL, why isn’t there
a function to wait for the verticle retrace? Or does
SDL_UpdateRect/SDL_Flip do this? I don’t know if DirectX games do this,
but I remember using it a lot when I programmed in DOS.


-= aaron p. matthews
-= rival entertainment
-= http://www.Nayzak.com/~jerryma/rival


[]s, Andrei de A. Formiga
andrei at elogica.com.br
andrei at dee.ufpb.br
@Andrei_de_A_Formiga

I think whenever you do a flip() with a back buffer or in a window it

automatically waits for the retrace.

With DirectX, you can't Flip in windowed mode. Which makes 

me wonder: under X windows, using SDL, SDL_Flip works in a
window ?On 24 Oct 99, at 21:37, Garrett Banuk wrote:


[]s, Andrei de A. Formiga
andrei at elogica.com.br
andrei at dee.ufpb.br
@Andrei_de_A_Formiga

“Andrei de A. Formiga” wrote:

I think whenever you do a flip() with a back buffer or in a window it

automatically waits for the retrace.

    With DirectX, you can't Flip in windowed mode. Which makes

me wonder: under X windows, using SDL, SDL_Flip works in a
window ?

SDL_Flip() doesn’t work in a window? My windows code was a little
unsmooth looking, does SDL_Flip default to something that does work and
the slowness is just windows or do I have to do something else to do a
double buffer flip under windows?> On 24 Oct 99, at 21:37, Garrett Banuk wrote:

At 10:52 PM 10/24/99 -0400, you wrote:

“Andrei de A. Formiga” wrote:

I think whenever you do a flip() with a back buffer or in a window it

automatically waits for the retrace.

    With DirectX, you can't Flip in windowed mode. Which makes

me wonder: under X windows, using SDL, SDL_Flip works in a
window ?

SDL_Flip() doesn’t work in a window? My windows code was a little
unsmooth looking, does SDL_Flip default to something that does work and
the slowness is just windows or do I have to do something else to do a
double buffer flip under windows?

 In win95, to do directX to a window you have to use overlays so you

have to blit from a back surface in memory to the primary display. I think
directx draws overlays in synch to the vertical refresh internally when you
update them.

-Mongoose WPI student majoring in Computer Science
This messge sent from Windoze… ugh.>> On 24 Oct 99, at 21:37, Garrett Banuk wrote:

At 10:52 PM 10/24/99 -0400, you wrote:

SDL_Flip() doesn’t work in a window? My windows code was a little
unsmooth looking, does SDL_Flip default to something that does work and
the slowness is just windows or do I have to do something else to do a
double buffer flip under windows?

 In win95, to do directX to a window you have to use overlays so you

have to blit from a back surface in memory to the primary display. I think
directx draws overlays in synch to the vertical refresh internally when you
update them.

DirectX doesn’t need to use overlays to blit to a window. If it did, many
video cards (most probably) wouldn’t be able to run DirectX in a window
because not all cards have overlay support.

When you’re using DirectDraw in a window, you blit directly to the primary
surface (which is the video memory currently being displayed). These blits
will show up immediatly. You need to wait for retrace yourself in order to
avoid shearing, etc…

If you want to see some code, I can send you a message I clipped from the
microsoft.public.win32.programmer.directx newsgroup.

DanielOn Mon, 25 Oct 1999, Garrett Banuk wrote:

rival games wrote:

There has been something I’ve been wondering about SDL, why isn’t
there a function to wait for the verticle retrace? Or does
SDL_UpdateRect/SDL_Flip do this? I don’t know if DirectX games do
this, but I remember using it a lot when I programmed in DOS.

SDL_Flip() waits for vertical retrace on hardware that supports it.
(Actually, I think the flip returns immediately, but the next surface
lock waits for the flip to complete at vertical retrace)

On hardware that doesn’t support it (i.e. in a window), the flip is
emulated by a full-screen update. Check the flags for SDL_DOUBLEBUF to
see whether or not the video surface is actually double-buffered.–
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Can I have the message too?
thanks in advance.

Danny Sinclair wrote:> On Mon, 25 Oct 1999, Garrett Banuk wrote:

At 10:52 PM 10/24/99 -0400, you wrote:

SDL_Flip() doesn’t work in a window? My windows code was a little
unsmooth looking, does SDL_Flip default to something that does work and
the slowness is just windows or do I have to do something else to do a
double buffer flip under windows?

 In win95, to do directX to a window you have to use overlays so you

have to blit from a back surface in memory to the primary display. I think
directx draws overlays in synch to the vertical refresh internally when you
update them.

DirectX doesn’t need to use overlays to blit to a window. If it did, many
video cards (most probably) wouldn’t be able to run DirectX in a window
because not all cards have overlay support.

When you’re using DirectDraw in a window, you blit directly to the primary
surface (which is the video memory currently being displayed). These blits
will show up immediatly. You need to wait for retrace yourself in order to
avoid shearing, etc…

If you want to see some code, I can send you a message I clipped from the
microsoft.public.win32.programmer.directx newsgroup.

Daniel