[SDL] FillRect patch

Mattias Engdegård f91-men at nada.kth.se
Fri Jan 26 16:25:18 PST 2001


Tue, 09 Jan 2001 Mattias Engdegård wrote:
[...]
> I personally think the usefulness of triple buffering is limited, but
> it might be worth supporting anyway. It probably requires an api
> revision though

Tripple buffering is a performance hack that can improve performance a great
deal in at least two cases:

	1. Software rasterizing + flipping involving hardware blitting.
	   The CPU can get started with the next frame while the flip is
	   in progress; double buffering would force the operations to
	   be serialized.

	2. Software or hardware rasterizing at less than full frame rate.
	   The engine can keep working most of the time, rather than
	   wasting time waiting for the *next* frame it it's a bit late.

	   For example, if it takes 110% of a frame period to render one
	   frame, double buffering would run at half frame rate, while
	   triple buffering would drop approximatey one frame in ten; ie
	   run at almost full frame rate.


Right, it's said that game engines are not all about speed. But if that's
true, how come almost every serious action gamer and engine coder is obsessed
with it...? ;-)


//David

..- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
..- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> david at linuxdj.com -'



More information about the SDL mailing list