Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double Buffering - General Question

Status
Not open for further replies.

iceice

Programmer
Feb 9, 2006
6
0
0
GB
When using double buffering in C++ to create an animation say of 30 images is it a good idea to create 30 off screen buffers and then blast each one to the screen when they've all loaded offscreen or is it better practise to just use 1 off screen buffer to prepare each image before blasting it to the screen
 
Well if you're hoping for any kind of real-time display then you need to be able to create the off-screen copy at about the frame rate of your display (say 50hz - or 20mS).

I'd say most people get away with a single off-screen buffer.

Put another way, 1024*1024 pixels * 32bit colour = 4MB per frame. 30 frames is 120MB!


--
 
Depends on the source of your images. If it is on a local disk, you might be able to get away with one buffer. If it has to come over a remote link, you'd be better off buffering the whole lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top