Jump to content
  • Advertisement
Sign in to follow this  
rangler

the differece between buffer strategys?

This topic is 5138 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My question is vary general, which impoves performance more page fliping or double buffering. In my situation I am using Java to make a 2D renderer. I have chosen to use a BufferedStrategy object to implement my buffer system which can accomidate either situation. Also if anyone knows of any good articles on the subject please let me know.

Share this post


Link to post
Share on other sites
Advertisement
With double buffering, two buffers are created and marked as foreground and background respectively. A frame is drawn onto the background frame and then when done is copied in full to the foreground frame which is then shown.

In page flipping, neither of the two buffers are marked differently and simply a pointer is used to alternate (flip) pointing to the current foreground frame. This eliminates an expensive full scene copy each frame and is thus significantly faster. Drawback is that the memory the buffers use is not guarenteed so checks for corrupted data must be writtern and then dealt with if they arise.

Java Games Programming Techniques is a good read which touches upon this subject in the earlier chapters.

- Oscar

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!