Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Screen Update API: final draft

This thread is locked; no one can reply to it. rss feed Print
Screen Update API: final draft
Richard Phipps
Member #1,632
November 2001
avatar

Quote:

I still don't really see the advantage over a plain double buffer, actually...

If you scroll with a double buffer you sometimes get tearing, even with vsync which can sometimes make it worse. Normally you would use page flipping or triple buffering but then normally you would have to use video memory which would slow down some kinds of gfx.

With a memory buffer and video memory you have the advantages of a memory bitmap without tearing.

You're going to have to trust me on this one. :) Don't drop it, it's very useful.

Evert
Member #794
November 2000
avatar

Ah... I see. With normal double buffering, you can still get tearing when you draw the backbuffer to the screen. By drawing the backbuffer to a second screenpage and using page flipping, you don't get tearing at all.

Ok, guess I'll put it back in for page flipping. I still don't see the use with triple buffering though...

Richard Phipps
Member #1,632
November 2001
avatar

Triple Buffering doesn't force you to wait for an update to complete like page flipping does.

Oscar Giner
Member #2,207
April 2002
avatar

Actually, I don't see the use with page flipping (my update API doesn't have this one). since page flipping usually works worse than double buffer (specially in windowed mode).

But with tripple buffer you have the advantage RP just mentioned.

Quote:

the initialization fails if a mode isn't supported rather than trying another one, for instance

I agree here. I'd suggest an autodetect mode (however, without any extra info, it wouldn't know if it should use *_WMB or not, that's why mine has the hw_accel flag).



Go to: