DirectX[DDRAW] surfaces

DirectX[DDRAW] surfaces

Post by arkan » Wed, 11 Feb 1998 04:00:00



Hey all!
  I was just wondering if you have to have a front and back buffer when
using DDraw.
If not, could you please suggest other methods I could use?
The reason I'm asking this is because the DirectX docs all rely upon
"flipping", which I've heard is not a very efficient method since it is
hardware specific.
Thanks!

-arkane

NOTE:
  Please email replies! I do not check up on UseNet too often

 
 
 

DirectX[DDRAW] surfaces

Post by Mirkuriu » Thu, 12 Feb 1998 04:00:00


Quote:>  I was just wondering if you have to have a front and back buffer when
>using DDraw.
>If not, could you please suggest other methods I could use?
>The reason I'm asking this is because the DirectX docs all rely upon
>"flipping", which I've heard is not a very efficient method since it is
>hardware specific.

Flipping is actually the most efficient way possible to render frames. The
video card needs nothing special, all are capable of flipping. The only
thing that is required is enough video RAM to hold both the front and back
buffer. It is possible to have the back buffer in system RAM, but that is
not true page flipping, and under the hood a Blt is performed when this is
the case.

Flipping involves simply holding two screens in video RAM. When you want to
display the first, the pointer to screen memory is set equal to the first
screen. When you want to "flip" to the back buffer, the pointer is simply
set to the beginning of the next buffer, so no pixel copying is required. It
is virtually instantaneous. I doubt any serious games dont use flipping.

Mirkurius

 
 
 

DirectX[DDRAW] surfaces

Post by Michael Cap » Fri, 13 Feb 1998 04:00:00


Actually, when I didn't have my video drivers setup correctly, my card
would not page flip.  This is something that not all cards will do.  
However, just about any card will do it today, and they all will do it
tomorrow.  If you're using DirectDraw (whose primary function is to give
you access to hardware speedups) then you can rely on this ability.  

As for alternatives, you simply blt or copy your images directly to the
primary surface.  As Mirkurius said, most games don't do this.  However,
if you are running windowed, you have to, as there is no double
buffering in windowed mode.

Michael Capps
(remove .nospam to reply by email)



Quote:> >  I was just wondering if you have to have a front and back buffer when
> >using DDraw.
> >If not, could you please suggest other methods I could use?
> >The reason I'm asking this is because the DirectX docs all rely upon
> >"flipping", which I've heard is not a very efficient method since it is
> >hardware specific.

> Flipping is actually the most efficient way possible to render frames. The
> video card needs nothing special, all are capable of flipping. The only
> thing that is required is enough video RAM to hold both the front and back
> buffer. It is possible to have the back buffer in system RAM, but that is
> not true page flipping, and under the hood a Blt is performed when this is
> the case.

> Flipping involves simply holding two screens in video RAM. When you want to
> display the first, the pointer to screen memory is set equal to the first
> screen. When you want to "flip" to the back buffer, the pointer is simply
> set to the beginning of the next buffer, so no pixel copying is required. It
> is virtually instantaneous. I doubt any serious games dont use flipping.

> Mirkurius