![]() |
![]() |
#1 |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,461
|
AGA double buffering using ChangeScreenBuffer() - C++
Hiya,
I had a quick go at this but didn't get very far, has anyone actually got this working? Here's my 'attempt' Code:
void video_flipscreentask() { struct MsgPort *video_dispport = CreatePort(NULL, 0); struct MsgPort *video_safeport = CreatePort(NULL, 0); screenBuffer[drawBuffer]->sb_DBufInfo->dbi_DispMessage.mn_ReplyPort = video_dispport; screenBuffer[drawBuffer]->sb_DBufInfo->dbi_SafeMessage.mn_ReplyPort = video_safeport; // Wait for safe to draw. while(!GetMsg(video_dispport)) { Wait(1l<<(video_dispport->mp_SigBit)); } c2p1x1_8_c5_bm_stub(320, 10, 0, 10, (UBYTE*)backBuffer->pixels, (UBYTE*)screenBuffer[drawBuffer ]->sb_BitMap); // Wait for safe to switch. while(!GetMsg(video_safeport)) { Wait(1l<<(video_safeport->mp_SigBit)); } // Switch. ChangeScreenBuffer(video_screen, screenBuffer[drawBuffer])); drawBuffer = 1 - drawBuffer; // cleanup pending messages while(!GetMsg(video_dispport)) { Wait(1l<<(video_dispport->mp_SigBit)); } DeletePort (video_dispport); // cleanup pending messages while(!GetMsg(video_safeport)) { Wait(1l<<(video_safeport->mp_SigBit)); } DeletePort (video_safeport); } Last edited by NovaCoder; 29 October 2010 at 02:29. |
![]() |
![]() |
#2 |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,461
|
I got the same kind of results for simply doing this:
Code:
// Draw to back buffer. c2p1x1_8_c5_bm_stub(320, 10, 0, 10, (UBYTE*)backBuffer->pixels, (UBYTE*)screenBuffer[drawBuffer ]->sb_BitMap); // Flip. while (ChangeScreenBuffer(video_screen, screenBuffer[drawBuffer]) == 0) { /* do nothing! */ ; } drawBuffer = (1 - drawBuffer ); |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Double PAL / Double NTSC, oficially supported by WHDLoad... | Shoonay | project.WHDLoad | 3 | 15 May 2021 19:42 |
Triple buffering | atchoo | support.WinUAE | 29 | 30 November 2011 11:58 |
lha buffering | source | support.Apps | 7 | 18 July 2011 16:53 |
flawless double buffering | dalton | Coders. General | 2 | 17 May 2011 07:09 |
Details of the AGA double CAS fetch mode? | Leffmann | Coders. General | 3 | 29 July 2008 11:26 |
|
|