[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
WhatLinksHere » arrays » Sun » CppStdioH » The GPRMC Sentence » QbasicFAQ_Mouse » scripting » CppCodeSnippets » Bill Gates » Programmer » QbasicFAQ_Double buffer
It is not possible to use double-buffred graphics for all screenmodes. The best resolution to use is SCREEN 9 (640x350).
Here a skeleton program that uses double-buffers and also ?video synch:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
WhatLinksHere » arrays » Sun » CppStdioH » The GPRMC Sentence » QbasicFAQ_Mouse » scripting » CppCodeSnippets » Bill Gates » Programmer » QbasicFAQ_Double buffer
It is not possible to use double-buffred graphics for all screenmodes. The best resolution to use is SCREEN 9 (640x350).
Here a skeleton program that uses double-buffers and also ?video synch:
' * Buffer indexes: *
Frontbuffer% = 0
Backbuffer% = 1
' * Main-loop: (until [Escape] is pressed) *
WHILE INKEY$ <> CHR$(&H1B)
' * Swap buffers: *
SWAP Frontbuffer%, Backbuffer%
SCREEN 9, , Frontbuffer%, Backbuffer%
' * Wait for video synch: *
DO WHILE (INP(&H3DA) AND 8) = 0
LOOP
DO WHILE (INP(&H3DA) AND 8)
LOOP
' * Clear old screen-buffer: *
LINE (0, 0)-(639, 349), 0, BF
' ********************************************
' Do your realtime graphic animations here =)
' ********************************************
WEND ' * End of mainloop *
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
