Jump to content
  • Advertisement
Sign in to follow this  

Synching a back buffer

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

Hi everyone, I'm trying to build a 2-D graphics package that works on top of XLib and completely hides the working of XLib. It is somewhat similar to the original BGI graphics package. The problem I'm facing now is how to properly handle the case where the window becomes partially or totally hidden due to other windows and needs to be redrawn. Obviously, I need to maintain an offscreen pixmap to hold the entire window contents. But how to synchronize the contents of the screen and the pixmap? I can't expect the users to explicitly call a routine that will do the synching. So I'm left with three alternatives: 1. The output of primitive goes to the pixmap and is then the whole contents are copied to screen. 2. The output of primitive goes to pixmap and only the region that is affected is copied to the screen. 3. The output of primitive goes both to screen and pixmap, i.e, it is drawn twice. Note that the synching must be done for each call to a primitive-drawing routine, and so must be as fast as possible. Which would be the best method? Is there a better method? I think the main question is: is scan-conversion faster than memory transfer? (The answer may also depend on the primitive type.)

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!