Skip to main content
GameDev.net gamedev.net
🔒 Locked

Double buffering in windows

Started by Dark Star Jan 30, 2003 at 9:34 AM 0 replies 250+ views
Original Post
Dark Star
Dark Star
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
---------------------------------------------You Only Live Once - Don't be afriad to take chances.
Punty50
Punty50
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
Brendan"Mathematics is the Queen of the Sciences, and Arithmetic the Queen of Mathematics" -Gauss

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.