Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!oliveb!amiga!jimm
From: jimm@amiga.UUCP (Jim Mackraz)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Intuition Questions (General Theory)
Keywords: How does Intuition interact with the Graphics Library calls?
Message-ID: <2531@amiga.UUCP>
Date: 29 Jun 88 05:55:27 GMT
References: <709@pdp.cs.OHIOU.EDU>
Reply-To: jimm@cloyd.UUCP (Jim Mackraz)
Organization: Commodore-Amiga Inc, Los Gatos CA
Lines: 104

In article <709@pdp.cs.OHIOU.EDU> arp@pdp.cs.OHIOU.EDU (John Gordos) writes:
)	I would like to do something similar to the "lines" demo on the 
)standard workbench; but it seems to have a larger raster than the window. 
)This has started me thinking, so I have some general questions concerning
)Intuition that I haven't seen addressed anywhere, and I'd appreciate some
)enlightenment. 

You are interested in SUPERBITMAP windows.  See the Intuition Reference
Manual.  Koan: all superbitmap windows must also be gimmezerozero.  

)	Just what is a window?  

You ask a very deep question.  It can have no answer.  The Window is
the misunderstood and the undefined.  It is everything, yet nothing
at all.

)	Is it a viewport? 

I can tell you this: It is not a viewport.

)Can I do many of the same things to a window that I can to viewports?

What would you do?

)Can there be multiple resolution
)windows on a Screen, or is a screen more like a viewport?

No.

)Can you give a window
)a larger raster than will appear inside the window? It would seem that you can,
)I was concerned about the "correct" way to do it.

SUPERBITMAP.

)   Any and all help along these lines would be appreciated.

            ^^^ -- not so sure about that anymore, are you? 

)John A. Gordos, III					cbatt!oucs!arp

OK, I'll try a little harder.

The World has two halves: rendering and video.  The world is centered
around the bitmap.  The rendering side of bitmaps is managed by
a RastPort.  The video display side is a ViewPort.

A RastPort/ViewPort pair, together with a single bitmap, is presented
to the Intuition programmer as a Screen.

Screens don't (yet!) do everything you can do with a ViewPort: they
don't scroll so well, but they do drag up and down (and around?),
determine their own independent resolution, depth, and color pallete.
Viewports themselves represent a small subset of the video effects
you can program the Amiga display hardware to do.

Viewports are implemented by beam-synchronized reloading of the display
controller register by the display coprocessor, or Copper.  They
take a couple of scan lines to set up, which explains why they are
always horizontally separated, not vertically.

Rendering through a screen rastport is highest performance.  It
undergoes no clipping.

Underlying Windows are Layers (managed by the rather incredible Layers
library).  Layers provides clipping and a depth arranged rectangular
region metaphor.  Clipped rendering is done through a RastPort
associated to a Layer (or Window) rather than a Screen.  Layers library
manages obscured bitmap save areas, large "superbitmaps", and presents a
metaphor of independent rendering regions.  

As an end result, the visible portion of rendering done to the layers
is affected in the contiguous bitmap associated with the Screen
containing the Layer or Window.

Superbitmap layers are an extension of the visible/obscured region
clipping using a separate, contiguous bitmap. This bitmap can be
kept in sync with rendering which modifies pixels in the onscreen
bitmap, the obscured save areas, and the portions of the
superbitmap beyond the logical boundaries of the window.

The Superbitmap window "scrolls" by the copying of data from the offscreen
bitmaps.  This is done by the blitter, and has nothing to do with
the display coprocessor or controller hardware.  It is a trick.
Bits are being copied around, rather than pointers changed.

Fools some of the people some of the time.  But one thing that
the Amiga does NOT do (yet) is perform display controller changes on 
vertical seams, which is sometimes called "hardware windowing."

Intuition Windows are basically Layers plus an input path and activation
metaphor.

And some other stuff.

Oh yeah, GimmeZeroZero windows are two layers each, and getting better
all the time.

	jimm
-- 
	Jim Mackraz, I and I Computing	  
	amiga!jimm	BIX:jmackraz
Opinions are my own.  Comments regarding the Amiga operating system, and
all others, are not to be taken as Commodore official policy.