Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!ucbcad!ucbvax!hplabs!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: Double Buffering Glitch (attn: CATS and other Guru's) Message-ID: <3680@well.UUCP> Date: Wed, 5-Aug-87 03:46:24 EDT Article-I.D.: well.3680 Posted: Wed Aug 5 03:46:24 1987 Date-Received: Sat, 8-Aug-87 12:38:42 EDT References: <1679@cadovax.UUCP> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Distribution: world Organization: Shyster and Shaft Legal Services. Lines: 38 Summary: Use ScrollVPort() In article <1679@cadovax.UUCP> keithd@cadovax.UUCP (Keith Doyle) writes: >Hi gang, > >Included in this message is an example of a 'glitch' I've been chasing >for some time, with no success. > >What I am attempting to do, is while double buffering two screens of >data, to cause the switch by swapping the bitmap structure pointed to >by the rastport with a secondary bitmap structure, and then do a: > > Forbid(); > MakeView(view); > MrgCop(); > LoadView(); > Permit(); > Hummmm. Did you know that you can do this, and Intuition won't mind: screen -> ViewPort.RasInfo -> BitMap = pointer_to_other_BitMap; ScrollVPort (&screen -> ViewPort); All you do is stuff the pointer to the bitmap structure you want, and call ScrollVPort() on the viewport structure. This has the added advantage that it massages the existing copper lists in place. MrgCop() computes a whole new list, which I'm sure takes much longer. Be sure you restore the original pointer before you call CloseScreen(); I've no idea what will happen if you don't. If you'd like to see ScrollVPort()-style double buffering in action, take a look at the source code to Ing, my windows-bouncing program. I use it in there. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Bike shrunk by popular demand, dual ---> !{well,unicom}!ewhac O----^o But it's still the only way to fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor