Welcome, Guest. Please login or register.

Author Topic: Double Buffer Example Convolted  (Read 1720 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Omega Space ProtonsTopic starter

  • Newbie
  • *
  • Join Date: Oct 2010
  • Posts: 41
    • Show only replies by Omega Space Protons
Double Buffer Example Convolted
« 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
 

Offline NovaCoder

Re: Double Buffer Example Convolted
« Reply #1 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
« Last Edit: November 18, 2010, 11:28:20 PM by NovaCoder »
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline Omega Space ProtonsTopic starter

  • Newbie
  • *
  • Join Date: Oct 2010
  • Posts: 41
    • Show only replies by Omega Space Protons
Re: Double Buffer Example Convolted
« Reply #2 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