Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Dark Star

Double buffering in windows

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

Can anyone tell me how to do double buffering in windows programming. I am using MFCs and using the Device contexts. I need to know if u need to create a secondary device context. If so I dont understand the parameters to create and initialise a DC. Second Do I have to send it as a parameter to pDC-CreateCompatibleDC(); I think I know where to go from there, using the pDC->BitBlt() function. Thanks. This is for a university animation project. Thanks DarkStar UK

Share this post


Link to post
Share on other sites
Advertisement
This is addressed in Sams Teach yourself MFC Programming:

1.) Create two device contexts that are equivelent (both dc.CreateCompatibleDC() ), one a memory context
2.) Do all of your drawing algorithms on one of the DC''s (the memory one)
3.) Bitblt() from one to another.

I need to check, but I am sure there is some way of creating a compatible memory DC.

Brendan

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!