Xref: utzoo comp.sys.amiga.tech:124 comp.sys.amiga:16830 Path: utzoo!mnetor!uunet!cbmvax!steveb From: steveb@cbmvax.UUCP (Steve Beats) Newsgroups: comp.sys.amiga.tech,comp.sys.amiga Subject: Re: Multiple viewports Message-ID: <3532@cbmvax.UUCP> Date: 28 Mar 88 14:34:45 GMT References: <2554@usceast.UUCP> Reply-To: steveb@cbmvax.UUCP (Steve Beats) Organization: Commodore Technology, West Chester, PA Lines: 30 Keywords: two viewports for every bitmap In article <2554@usceast.UUCP> baldwin@usceast.UUCP (Chuck Baldwin) writes: > >[Not being entirely sure where this should go, I post to both] > >I am trying to perform a conceptually simple task, of showing two >different views of a large bitmap by using two ViewPorts. My code >is not in obvious error, and I get bizarre but repeatable results. > >Allocate a View, two ViewPorts, two RasInfos, one RastPort, and one BitMap >Initialize these items appropriately: > Point both RasInfo to BitMap > Give each ViewPort it's own RasInfo > Link two ViewPorts through vp.Next field > Link ViewPorts into View >Do arcane things to generate copper lists >ON_DISPLAY; > > >The problem is this ... the first ViewPort has graphics correctly >rendered, but the second doesn't. In fact, the second ViewPort is black, which >is not the currently defined background color. It's as if the display >is not spewing electrons for the bottom half of the screen. > I suspect the line where you 'Do arcane things to generate copper lists'. I had a similar problem with linked ViewPorts. When you call MakeVPort(v, vp) it is not enough to call it with a pointer to the first ViewPort in your list. YOU MUST CALL MakeVPort() FOR EVERY VIEWPORT LINKED TO vp.Next!! I am pretty sure this will fix your problems (poof). Steve