[comp.windows.news] NeWS Tips for Silicon Graphics 4D

tohanson@gonzo (Jeff Hanson) (05/02/90)

I am the administer of six Silicon Graphics IRIS 4D workstations.  NASA Lewis
as a whole has about 40.  These workstations is NeWS as their windowing
system.  I am looking for SGI specific hints, code, etc.   Most of what I
have seen in this news group has been Sun oriented.  In particular, if anyone
has ported the NeWS tape from Sun to SGI I would like to here about it.
(Basic help on BSD to SYSV conversion would be great, as well).

Thanks in advance!

--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
 \ / \ / \ / \ / \ / \ /        Jeff Hanson            \ / \ / \ / \ / \ / \ / 
  *   ViSC: Better    *  tohanson@gonzo.lerc.nasa.gov   *   *   *   *   *   *  
 / \ / \ Science / \ / \  NASA Lewis Research Center   / \ / \ Through / \ / \ 
*   *   *   *   *   *   *   Cleveland, Ohio 44135     *   *   *  Pictures *   *
 \ / \ / \ / \  Telephone - (216) 433-2284  Fax - (216) 433-2182   \ / \ / \ / 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

bice@hbo.UUCP (Brent A. Bice) (05/05/90)

   The biggest things I've run across are:
      1) In the latest version of news on the SGIs, Canvases don't appear to
         be retained.  When I asked the SGI techies 'bout this, they said
         "Hmmm.. Seems ta be a bug.  Why doncha use our 4d libraries instead"
         So, it seems retained canvases can't be counted on.
      2) Next, some NeWS programs assume some size for the framebuffer.  Don't
         do this.  You can figure out the width/height of a canvas easily
         enough.
      3) Some primitives (like copyarea) behave differently with real values
         than they do on the SUNs.  I made a scrolling text window that worked
         great on a SUN, but would gradually get off by 3 or 4 pixels on the
         SGI unless the window just happened to be the right dimensions for a
         given text font.
      4) Text itself appears to be REALLY slow on the SGI (yep, even worse than
         under OPENLOOK on a SUN)!  Don't assume that it'll be fast like it is
         on the SUNs.
      5) There appears to be a bug in SGI's event handling.  If you give an
         item a downtransition (like a scrollbar for instance) and then drag
         the mouse around everything appears to be fine, but if you drag the
         mouse out of the item's canvas, and BACK IN to the canvas, all drag
         events stop...  Hmmmmm....  So the you let go of the mouse button
         sending the uptransition, and all of the mouse drag events start
         being trapped again.  So (without holding down a button) you can drag
         the mouse around and move the scrollbar/dial/slider/whatever until you
         send another downtransition and uptransition (click the mouse button).

That's mosta the nasties that I've seen on our SGI here.  This is with the
latest version of their 4sight.  If you're running an older version, you may
still have retained canvases (they introduced this bug with the last version
upgrade), but you might also have a bug with typedprint.  It seemed that some
real values would not get typedprinted ok because they were not fixed point
(another type that I don't know how to check for). Essentially any real value
we were gonna typedprint we had to first do:
   10000 mul cvi 10000 div
or some such nonsense.  This got FIXED with the last update of 4sight.


   Brent Bice
   Applied Computing Systems
   2075 Trinity Drive  Suite Lower Level
   Los Alamos, NM  87544
   (505) 662-3309
   bice@atlantis.ees.anl.gov

msc@ramoth.esd.sgi.com (Mark Callow) (05/10/90)

In article <9005041643.AA08069@>, bice@hbo.UUCP (Brent A. Bice) writes:
|> 
|>    The biggest things I've run across are:
|>       1) In the latest version of news on the SGIs, Canvases don't appear to
|>          be retained.  When I asked the SGI techies 'bout this, they said
|>          "Hmmm.. Seems ta be a bug.  Why doncha use our 4d libraries
instead"
|>          So, it seems retained canvases can't be counted on.
The news server on the SGI runs on one of 2 modes: 8-bit color index and
24-bit rgb.  Retained canvases have never worked when the server runs in
24-bit mode.  They have always worked (modulo a bug in rendering text into
memory) when the server runs in 8-bit mode.

In 24-bit mode retained canvases sort of 1/2 worked.  Bits would be saved
from the screen when windows were obscured but nothing would ever be
rendered into the obscured retained portions of the windows.  I decided
that this was worse than them not working at all so in release 3.2 I
completely disabled retained canvases when running in 24-bit mode.
At least that way clients would get /Damaged notification when windows
needed to be redrawn.  Those clients that payed attention to the NeWS
spec. (retained canvases are a performance optimization only and the server
may stop supporting them at any time) would work correctly.

Did you upgrade your hardware to 24-bits as well as upgrading your software?
It's hard to believe that any program would have found the retained canvas
behaviour on 24-bits useful.

The good news is that in the next release (IRIX 3.3, 4Sight 1.5) retained
canvases are completely operational in both 8- and 24-bits.  Even the
text rendering bug has been fixed.  Backgammon works like a charm.

Incidently, a lot of NeWS clients use retained canvases when they should
really use buildimage and imagecanvas.  With the latter they can save
memory and actually work faster than retained canvases.

|>       4) Text itself appears to be REALLY slow on the SGI (yep, even
worse than
|>          under OPENLOOK on a SUN)!  Don't assume that it'll be fast
like it is
|>          on the SUNs.

Hmm!  This is news to me.  Please send me more details.

--
From the TARDIS of Mark Callow
msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc
"There is much virtue in a window.  It is to a human being as a frame is to
a painting, as a proscenium to a play.  It strongly defines its content."