Sign in to follow this  

the differece between buffer strategys?

This topic is 4860 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
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

This topic is 4860 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this