Double Buffering

HI...any info, people????


  • : HI...any info, people????


    Any info? Well, double buffering means that you draw an animation frame to an off-screen buffer, and then blit the buffer to video memory all at once. It is used to make animations look smoother. You can also draw to a portion of video-memory which is at that time not displayed on screen, and then simply flip the page to that section of memory when the frame is done. This is called page flipping (... :), and is usually more efficient than a buffer in main memory (unless you draw a pixel more than, say, twice on average).

    As for QuickBasic, as far as I know you can only use page flipping in screen 9, unless you write your own graphics library in another language. A main-memory buffer is rather complicated and not very efficient, because you run into one or several of the following problems:

    - Without using the graphics PUT statement, you will probably not be able to blit to screen at an acceptable rate (even PUT itself is rather slow).

    - If you do use PUT, it is quite difficult to draw into the off-screen array, due to the different formats of these images and the limitations of QuickBasic.

    - With or without PUT, you are likely to bump into the 64k-size limit.

    If there is anything else you'd like to know, or some things are not clear yet, feel free to ask :)



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!