Path: utzoo!attcan!telly!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!jarthur!nntp-server.caltech.edu!toddpw From: toddpw@nntp-server.caltech.edu (Todd P. Whitesel) Newsgroups: comp.sys.apple2 Subject: Re: fast screen updates on the GS Message-ID: <1991Feb22.052544.2267@nntp-server.caltech.edu> Date: 22 Feb 91 05:25:44 GMT References: <2556@kluge.fiu.edu> Organization: California Institute of Technology, Pasadena Lines: 44 acmfiu@serss0.fiu.edu (ACMFIU) writes: >thinking that QuickDraw would "know" that it is NOT the same address as >the screen ($e12000) and thus not add the extra overhead for writing directly >to the screen. What overhead? There is no overhead for writing directly to the screen other than the slow writes to the $e1 buffer; they aren't the primary time waster, however. There IS a lot of overhead for drawing things that have to be clipped, which is where people seem to be having problems. QuickDraw's region processing is beastly slow, and since the window manager uses it extensively to draw overlapping windows, accelerators become an attractive option. Quickdraw itself doesn't care where the pixel map is, except for the cursor routines and such. What you need to do is create an offscreen grafport (do this with OpenPort and SetPortLoc) and draw your stuff into the offscreen grafport. When you want to update your window, use PaintPixels or PPToPort. Correct me if I'm wrong, but you want to reduce the number of times you have to draw the objects you're displaying in the window. The method I just described allows you to keep an offscreen image and issue a single call to update your window, which is what I believe you are looking for. >It seems that QuickDraw is not "smart" enough to figure this out. What in >the world is so darn hard about making an off-screen GrafPort? Nothing. On off-screen GrafPort is any GrafPort whose LocInfo field has been replaced or modified -- I've studied the QD chapter and the tech notes about it, and I think I'm beginning to understand what all is going on. There's a tech note that will probably help you a lot -- I'll put it up on tybalt.caltech.edu in pub/apple2/transfer; mail me if you don't have FTP. > Maybe I don't fully understand QuickDraw because the manuals don't seem too >enlightening to me. There weren't too enlightening to me either. IIgs technote 80, QuickDraw II Clipping, explains quite a bit and makes sense of the toolcalls you mentioned. It's on tybalt now, and will be in pub/apple2/transfer by the time you read this. Todd Whitesel toddpw @ tybalt.caltech.edu Brought to you by Super Global Mega Corp .com