Jump to content
  • Advertisement

Archived

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

rangler

basic rendering

This topic is 5277 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, I am very new at making games (working on first). My question is: If you have a double buffer system, which makes more sense? 1) You put the "draw from back buffer to front buffer" function in its own thread and frame rate sync it. or 2) In your main loop update & draw all the sprites than call "draw from back buffer to front buffer".

Share this post


Link to post
Share on other sites
Advertisement
Avoid the extra thread. Besides, the back buffer is hardly ever literally copied to the front buffer. It''s more along the lines of swapping the pointer that points to the back buffer with the pointer that points to the front buffer, and vice versa. Both buffers thus switch rolls each frame.

Share this post


Link to post
Share on other sites
Im using win32 GDI. The Front and Back buffer are both HDC. I am using BitBlt() to copy the back to the front.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What''s the point of putting it in a thread? It''ll only end up waiting for the draw to finish before it issues the blit anyway.

Share this post


Link to post
Share on other sites
So if I don''t put it into its own thread how can I program a constant frame rate, so I can set the animation speed?

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.

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!