🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24133

Re: visual classes

#24133
From: Rich Thomson
Date: Wed, 26 Jun 1991 22:52
59 lines
3089 bytes
In article <26521@beta.gov>
	aob@beta.gov (Alexander O. Brown) writes:
>How common are systems that only support TrueColor or StaticColor?

Our current server supports 8-bit PseudoColor, 24-bit TrueColor and
24-bit DirectColor.

>Also, DirectColor is supposed to support PseudoColor.

I'm not sure what you mean by this statement.  DirectColor is more
powerful than PseudoColor in that one can simulate PC with DC.

>How would I change the visual from Direct to Pseudo?

You can't change a visual.  Visuals are static entities supported by
the server.  Although I am not 100% sure, I don't think you can change
the visual class of a window.  Visuals are used to specify attributes
of a window when it is created.

>Or is there always a Pseudo visual avaiable if the default is Direct?

There is no guarantee of this.

>Or do I simply just "simulate" Pseudo with code?

This is what I would imagine.


More and more high-performance workstations are supporting access to
the hardware capabilities through X with a variety of visual types
("tools not rules").  It is best to make absolutely *NO* assumptions
about visual classes.  Use XMatchVisualInfo and its ilk to find out
what list of visuals are supported on the server.  Printing out a
message like "This program requires a PseudoColor/DirectColor/StaticColor
visual with a colormap of at least 8 entries." and then exiting is
much more graceful than "Segmentation fault (core dumped)".

I have seen much too much of the latter for programs that assume that
the rest of the X world is just like their 8-bit pseudocolor
workstation.  The main reason we implemented a virtual screen with a
8-bit PC root window was to facilitate dumb applications that insist
on using the same visual as the root window, or expect that everyone
has 8-bit PC visuals.

Although TrueColor and DirectColor visuals are inherintly more
powerful than PC visuals (with the possible exception of some colormap
cycling effects), almost nobody understands how to use them.

There is a tutorial in the R4 source tree on how to use visuals, but
it seems that most people are unaware of it.  It seems like there is a
need for a more widely distributed (and updated) tutorial on how to
use visuals and how to select which visual you need.

						    -- Rich
-- 
  ``Read my MIPS -- no new VAXes!!'' -- George Bush after sniffing freon
	    Disclaimer: I speak for myself, except as noted.
UUCP: ...!uunet!dsd.es.com!rthomson		Rich Thomson
Internet: rthomson@dsd.es.com			PEXt Programmer
Technical Details
Message-ID: <1991Jun26.225244.15346@dsd.es.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!orca!mesa!rthomson
References: <26521@beta.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!orca!mesa!rthomson
From: rthomson@mesa.dsd.es.com (Rich Thomson)
Newsgroups: comp.windows.x
Subject: Re: visual classes
Keywords: TrueColor, StaticColor
Message-ID: <1991Jun26.225244.15346@dsd.es.com>
Date: 26 Jun 91 22:52:44 GMT
References: <26521@beta.gov>
Sender: usenet@dsd.es.com
Reply-To: rthomson@dsd.es.com (Rich Thomson)
Organization: Design Systems Division, Evans & Sutherland, SLC, UT
Lines: 59
Nntp-Posting-Host: 130.187.85.21