This site is no longer active and is available for archival purposes only. Registration and login is disabled.

using of two buffers instead of one in firework example?


using of two buffers instead of one in firework example?

Postby Bunkai » Nov 12, 2006 @ 6:33pm

Hello,

After what I downloaded PocketHAL 0.7.7 evaluation version, I decided to analyze examples to understand how the library works. Therefore, I looked at Firework example.

I noticed tha the firework is firsty drawn into m_buffer2 buffer, which is at one moment coppied to backbuffer returned by display->GetBackBuffer(), and this is then swapped via display->Swap(); to video RAM.

In other words, instead of using one buffer that would be flipped to the video ram, there is a second buffer used.

Is this approach somehow beneficial to PocketHAL? Logic says to me, that it is most likely a waste of computer resources. I understand the need of one buffer that is coppied to VRAM once, to avoid delays from waiting to vsync, but what that second buffer is good for?

Is is a technique I've read about, called DoubleBuffering?

Thank you,
with Regards,
Rene.
Bunkai
pm Member
 
Posts: 71
Joined: Mar 18, 2006 @ 5:01pm


Postby fast_rx » Nov 12, 2006 @ 9:12pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Bunkai » Nov 12, 2006 @ 10:50pm

Bunkai
pm Member
 
Posts: 71
Joined: Mar 18, 2006 @ 5:01pm


Postby fast_rx » Nov 13, 2006 @ 12:22am

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Bunkai » Nov 13, 2006 @ 9:42am

FastRX,
Thank you. Now I am sure what double-buffering is about.

With regards,
Rene
Bunkai
pm Member
 
Posts: 71
Joined: Mar 18, 2006 @ 5:01pm


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron