Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Omega Space Protons on November 18, 2010, 02:34:30 PM

Title: Double Buffer Example Convolted
Post by: Omega Space Protons on November 18, 2010, 02:34:30 PM
I just received my Amiga 2.1 Developer CD and looked for the double buffer example as many amiga.org forum users suggested. Under Extras\RDK2.1\Examples\Intuition i found that example under the file DBUFFER.C. However i find the example too difficult to understand as everything is under the main function and as far as error handling goes there are only 1 or 2 checks and neither have error messages tied to them. If someone would be willing to explain the example a bit it would be greatly appreciated.

Omega Space Protons
Title: Re: Double Buffer Example Convolted
Post by: NovaCoder on November 18, 2010, 11:25:55 PM
Hiya,

Can you post the source code in this thread (I think Hypex already sent it to me but it would be good to see it here).

I had a play around with this already and found it a bit of a pain in the ass to get working.

From what I found the following code *seems* to achive the same results for a single threaded application:

Code: [Select]

// Flip.
while (ChangeScreenBuffer(video_screen, screenBuffer[drawBuffer]) == 0) {
/* do nothing! */ ;
}


The idea being that ChangeScreenBuffer() returns zero if it can't do the flip and probably does the signal checking stuff internally.

UtilityBase (http://utilitybase.com/forum/index.php?action=vthread&forum=3&topic=2155#msg17869)
Title: Re: Double Buffer Example Convolted
Post by: Omega Space Protons on November 19, 2010, 07:38:41 PM
I took a look at the link you posted and the code is very different to the one given to me on the developer cd. The code on that link is very straightfoward and easy to follow unkike the code provided on the cd. Unfortinately i am unable to post the source code entirely as the code is from the Amiga Developer CD 2.1, and as i had to pay to "license it" i doubt it would be legal for me to freely distribute it. I would hate  for me or amiga.org to get in trouble for posting copyrighted material.
 
Omega Space Protons