| From: | Robert Kihl |
| Date: | 01 Sep 2000 at 00:10:00 |
| Subject: | Re: Triple buffering (was: Re: CGX and Bitmaps) |
On 31-Aug-00, you wrote:
>
> On 31-Aug-00, David McMinn wrote:
>
>>> This way the program only have to wait when both the buffers are full
>
> Well, the program still need to switch buffer each time there's a
> vertical retrace. I don't see any way around this, no matter how many
> frames you pre-render, buffer or similar... of course there's the
> technicality of not actually waiting, but instead receiving an
> interrupt. But I don't think this is what you ment...
Yeah, of course the program have to switch buffer when there's a vbl (and a
buffer to display), otherwise the screen wouldn't update :)
But, the difference is that in triple buffering the program doesn't have to
stop rendering and wait for the vbl 'cos it has an extra buffer to render
to. Of course if it renders so fast that it can fill that buffer too before
the next vbl then the program has to halt and wait for the vbl. But if that
is the case then the program is running in full frame rate and it wouldn't
matter much if it has to wait.
Some interrupt would be needed that checks at each vbl if there is a buffer
that should be displayed. So the program doesn't switch buffer at each vbl,
only if there is a buffer that should be displayed.
So programs that use triple buffering and doesn't run in full frame rate
should get a few extra fps than if they used double buffering that waits
for the vbl.
>> [...] Probably the "correct" use of the term, given the way
>> double buffering works.
>
> The explanation I gave some time ago was what triple buffering meant 10+
> years ago, I think this predates every other explanation seen here, thus
> is the "correct" one, if you really want to promote one of the
> explanations... ;-)
The method that I've described is what I think is used in Heretic2, please
correct me if I'm wrong :)
Cya