Article View: comp.sys.amiga.tech
Article #11469Re: Double Buffered Display
From: Leo 'Bols Ewhac' Schwab
Date: Wed, 22 Feb 1989 09:44
Date: Wed, 22 Feb 1989 09:44
36 lines
1757 bytes
1757 bytes
[ Much convoluted code and consternation by Kevin deleted. ]
Yuck. The approach documented in the RKM is icky, and hard to work
with. I like this approach much better:
--------
InitBitMap (&bm1, deep, wide, high);
InitBitMap (&bm2, deep, wide, high);
InitVPort (&vp1);
InitVPort (&vp2);
InitView (&v1);
InitView (&v2);
v1.ViewPort = &vp1;
v2.ViewPort = &vp2;
rasinfo1.BitMap = &bm1;
rasinfo2.BitMap = &bm2;
rasinfo1.Next = rasinfo2.Next = NULL;
vp1.RasInfo = &rasinfo1;
vp2.RasInfo = &rasinfo2;
MakeVPort (&v1, &vp1);
MakeVPort (&v2, &vp2);
MrgCop (&v1);
MrgCop (&v2);
--------
At this point (.), you can LoadView() either v1 or v2, and it'll pop
onto your screen at the next VBLANK. Much less pain and misery all around.
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape INET: well!ewhac@ucbvax.Berkeley.EDU
\_ -_ Recumbent Bikes: UUCP: pacbell > !{well,unicom}!ewhac
O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack")
"Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor
Technical Details
Message-ID:
<10801@well.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!think!bloom-beacon!apple!well!ewhacReferences:
<938@wpi.wpi.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!think!bloom-beacon!apple!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga.tech,comp.sys.amiga Subject: Re: Double Buffered Display Summary: Ooo. Ick. Message-ID: <10801@well.UUCP> Date: 22 Feb 89 09:44:17 GMT References: <938@wpi.wpi.edu> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Followup-To: comp.sys.amiga.tech Organization: The FOX Network. For people who just can't get enough bad TV. Lines: 36 Quote: "I went to court for a parking ticket; I pleaded insanity." -- S. Wright