Path: utzoo!attcan!uunet!husc6!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: CopyBits and the Mac II Message-ID: <10024@dartvax.Dartmouth.EDU> Date: 7 Sep 88 23:06:25 GMT References: <51404DN5@PSUVM> <10006@dartvax.Dartmouth.EDU> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: none Lines: 34 In article <10006@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes: >In article <51404DN5@PSUVM> DN5@PSUVM.BITNET (D. Jay Newman) writes: >>Hi out there: >> >>I am programming a simple animation on the Mac (a simple polygon rotating >>around the center), and to make it smoother I used an off-screen bitmap, >>and I used CopyBits to get it onto the screen (like TechNote 41). >> >>This works correctly with a Mac Plus, but the Mac II includes a lot of >>garbage in the rectangle with the rotating polygon: I can still see the > >I am doing something very similar on the Mac II, a rotating three >dimensional whatchamacallit. On the II, I use color windows and >PixMaps, rather than BitMaps, for the offscreen storage. This is >explained in TechNote 120, along with example MPW Pascal source... The problem turns out to be that on the Mac II, the offscreen BitMap appears to need its own GrafPort, whether you are using Color QuickDraw or Vanilla QuickDraw. I suggested to Jay that he try attaching his offscreen BitMap to a separate port, opened using OpenPort. Then instead of using SetPortBits to switch between BitMaps, use SetPort to switch between ports. This cured his problem, according to mail he sent me today. The technique described in Technote #41 doesn't appear to work properly on a Mac II, then. I would like to see a revised Technote #41 giving a method of drawing to an offscreen BitMap which is upward compatible from the Mac Plus and SE to the Mac II. Then developers who don't have access to a Mac II and who want to do animation would have a better chance of being upward compatible... Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755 (603) 643-4109