|
Atari coding BBS
Benefits of tripple buffering |
Posted by: Simon Sunnyboy / Paradize
|
Jul,08.2010-19:25
|
Hello together,
today I was thinking if tripple buffering graphics may have an advantage.
I think Paranoid and earx already suggested using so....(yeah i'm reinventing the wheel) but I would like to explore the backgrounds of the technique a bit.
The idea is to have 3 logical screens
1 screen of those is shown (physical screen)
1 of the 3 screens is selected as the logical screen to draw onto
MAINLOOP:
<- NOTE: NOT synced with VBL here
draw background to logic screen
draw sprites and objects to logic screen
set physical screen to set by next VBL interrupt to the current logic screen
update logic screen pointer for next drawing cycle to the next out of 3
continue at MAINLOOP
The VBL ISR interupts the loop at any time and sets the screen address to the one given
in the step "physical screen". The old address is kept unless changed from within the loop.
In theory, if drawing takes 1,5VBLs, at one time I will happen to draw faster so that one of my frames will get shown 1 VBL long only because the next one is already ready and its address set.
I wonder if this gives any advantages or disadvantages?
Just thinkering, no special application or game planned ;)
cheers,
ssb
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|