DN5@PSUVM.BITNET (D. Jay Newman) (08/31/88)
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 rotation (very fast on the II), but there is what appears to be random noise. The same thing happens on both IIs that I have available. The system I am using is MPW Pascal, with MacApp. I am using srcCopy as the copy mode in CopyBits, and I am copying from a standard BitMap to the BitMap of a standard WindowPtr. I would appreciate any help or pointers I could get. Thank You, Jay, etc...
bob@eecs.nwu.edu (Bob Hablutzel) (09/02/88)
> 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 > rotation (very fast on the II), but there is what appears to be random noise. > The same thing happens on both IIs that I have available. Does the garbage persist after the rotation is stopped? Could you be rotating so fast that you are doing more than one update per screen refresh? Bob Hablutzel BOB@NUACC.ACNS.NWU.EDU This space intentionally left blank
earleh@eleazar.dartmouth.edu (Earle R. Horton) (09/04/88)
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. You might want to consider doing this if your program is to work on both color and non-color machines and you have some access to a II during your development. It took me about a day to work up the necessary routines, including testing for machine type, using the correct type of Map for the present machine, and so forth. Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755 (603) 643-4109
earleh@eleazar.dartmouth.edu (Earle R. Horton) (09/08/88)
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