Xref: utzoo comp.sys.amiga.tech:17981 comp.sys.amiga.graphics:979 comp.sys.amiga.programmer:2749 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!dimacs.rutgers.edu!rutgers!cbmvax!cbmehq!cbmfra!swinjm!forgeas From: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Newsgroups: comp.sys.amiga.tech,comp.sys.amiga.graphics,comp.sys.amiga.programmer Subject: Re: Question re. double buffering / Intuition Message-ID: <18fe912f.ARN0ce8@swinjm.UUCP> Date: 16 Apr 91 10:21:35 GMT References: <115475@unix.cis.pitt.edu> Reply-To: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Followup-To: comp.sys.amiga.tech,comp.sys.amiga.graphics,comp.sys.amiga.programmer Organization: The Software Winery Lines: 55 In article <115475@unix.cis.pitt.edu>, Kenneth D Jordan writes: > My problem arises when calling other functions such as OpenRequester, > [..] When opening requesters > the border often ends up on the correct RastPort but the gadgets never appear. > Letting rp be a pointer to the rendering RastPort (which works for functions > which require a ptr to a RastPort) and win be a pointer to the window, I've > tried things like win->RPort = rp and win->BorderRPort = rp before opening a > requester, but there's no apparent effect. RastPorts are not the thing, just the bitplanes of the display. You need only to swap pointers to the new set of bitplanes into the window/screen bitmap, and call MakeVPort() and MrgCop(). Or you can directly swap the copper lists if you want. If you don't want Intuition to draw into your imagery, lock one or all the layers which are into the screen. Intuition will not even move prop gadgets while swaping, and will do it nicely after. Call all your rendering routines inside the 'swap' routine. For example to open a requester: Swap( myOpenRequest ); and here is the myOpenRequest() function: myOpenRequest() { if (Request( Req, WorkWindow )) WaitIDCMP( WorkWindow, REQSET ); } Swap( func ) VOID (*func)(); { LockLayer(); // lock the display BltBitMap(); // copy the display to hidden bitmap WorkWindow->RPort->BitMap = bm; // swap the bitplanes sc->BitMap.Planes[...] = bm->Planes[...]; if (func) (*func)(); // your rendering to hidden bitmap MakeVPort(); // the hidden becomes the display MrgCop(); UnlockLayer(); // unlock the display } That's just the beginning, you have work to do! And think about the fact that the modification of these pointers is perhaps not supported under 2.0 or 5.0... Perhaps Peter Cherna have a better solution ? -- \___/ Jean-Michel Forgeas \-/ cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery -^- And, where is the universe ?