Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!agate!darkstar!ANDERSON@SECS.ucsc.edu From: anderson@SECS.ucsc.edu Newsgroups: comp.sys.mac.programmer Subject: Problems with color animation Message-ID: <17477@darkstar.ucsc.edu> Date: 26 Jun 91 19:44:02 GMT Sender: usenet@darkstar.ucsc.edu Reply-To: anderson@SECS.ucsc.edu Organization: UCSC Molecular Engineering Laboratory Lines: 32 Would some kind reader please take the time to help me retain my sanity? I am in the process of porting an MSDOS molecular dynamics animation viewer to the Mac. This program uses offscreen drawing to give smooth animation. I have been able to get good results on the Mac in monochrome by drawing to an offscreen bitmap and then using CopyBits to move it to the window. The problem comes when I try to use color. I have been able to get the drawing to the offscreen bitmap and I can copy it to the screen but I get a terrible flicker. I have used SlotVInstall to try to synch the copybits to the vertical retrace but it didn't cure the problem. I have waded through Inside Macintosh I-V, the Mac Technical Notes, and the Usnet Mac Programmer's Guide and I have run out of ideas on what to try next. HELPPPPPPP!!!!!!!! The size of the bitmap may be a contributing factor. I am using the full screen for the drawings so my first question is whether or not it is possible to do the copybits fast enough on this large a bitmap? The program is written in C (about 125K of source code). Originally written with Turbo C++ 1.0 for MSDOS, porting to the Mac using Think C 4.0. Using a Mac IIx for the port to Mac. While I am reasonably experienced with C, this is my first attempt at writing a program for the Mac so please show some mercy if I have overlooked an obvious answer. Sample source code in any language would help but C would be most useful. Gary D. Anderson Department of Chemistry University of California Santa Cruz, CA 95060 anderson@secs.ucsc.edu