What is the best way of implementing double buffer?

Status
Not open for further replies.

123music

Junior Member level 1
Joined
Jun 24, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,381
What is the best way of implementing double buffer?
Is it by defining two arrays or by two dimensional arrays?

Can anyone please post a sample code for me....
 

Re: Double Buffer

two pointers wz enough space.
is famous for video output.
--
Amr
 

Re: Double Buffer

amraldo said:
two pointers wz enough space.
is famous for video output.
--
Amr
I didn't get you..Could you please explain....
 

Re: Double Buffer

to send video to the output device.
You allocate 2 pointers with space enough for frame data.
You store data in a buffer while sending the other buffer to the driver.
In the next you switch the buffers. The one sending is now used for storing and vice-versa.
--
Amr
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…