Sign in to follow this  

Synching a back buffer

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

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