[comp.unix.i386] Super VGA X server

cs__sjh@umt.UUCP (Jeffrey Heng) (07/02/90)

Hi, 
	Can I set my X windows to use 256 colors instead of 16 colors? (We're
using 386ix X windows system running MOTIF).
	The Xconfig only gives a choice of 1, 2, or 4 bit planes only.  Will the
new release of X for 386ix support 8 bit planes for color?  Since we're using
a SuperVga card, we should be able to display 256 colors in 640x480 resolution.
Right now I keep running out of color allocation.  Can anyone recommend good 
books on MOTIF programming ?  The only one I heard of is O'Reilly's Vol. 6 - 
Motif programming, but it's yet to be released.   

Thanks.  

Jeffrey Heng

tyager@maxx.UUCP (Tom Yager) (07/04/90)

In article <849@umt.UUCP>, cs__sjh@umt.UUCP (Jeffrey Heng) writes:
> 
> Hi, 
> 	Can I set my X windows to use 256 colors instead of 16 colors? (We're
> using 386ix X windows system running MOTIF).

I'm told that release 1.2 of ISC's X Window package supports 256 color
operation up to 800x600 (on boards that support it). Expect it to be slow,
but usable.

Motif is a color hog, but there are some ways around it. The Motif developer's
kit from ISC includes a set of alternate mwm resource files. It's the window
manager that eats up most of your colormap entries. When you're testing your
software, consider using one of the alternate resource files to set your
window borders to monochrome.

Another trick is to use the same color resources in your application as mwm
uses. When I'm working up an application, everything is black, white,
CobaltBlue and LightGray, the latter two being used for those things that
get shaded (buttons, etc.). If you manage the overlap just right, you can
have mwm and your app running together without running out of cmap entries.
That's assuming, of course, that you're not displaying pixmaps or are
otherwise in need of lots of colors.

> Can anyone recommend good 
> books on MOTIF programming ?  The only one I heard of is O'Reilly's Vol. 6 - 
> Motif programming, but it's yet to be released.   

I've just read through the Prentice-Hall "The X Window System Programming and
Applications with Xt--OSF/Motif Edition" (short title!) by Douglas A. Young.
The descriptive text sometimes lacks proper detail, but the examples and
illustrations are incredibly well-done. You can learn enough from those alone
to become proficient. You will still need the OSF guide and reference set,
but these are included with ISC's Motif developer's kit.

Also, the book's sections on resources show how they really should be used.
It could help Motif programmers avoid the trap of compiling too many resource
definitions (button labels, colors, etc.) into their code.

Happy Motif hacking, and good luck!
(ty)

-- 
+--Tom Yager, Technical Editor, BYTE----Reviewer, UNIX World---------------+
|  NET: decvax!maxx!tyager     -or-     uunet!bytepb!maxx!tyager           | 
|  I speak only for myself           "UNIX: It's not a job,                |
+-------------------------------------it's a Jihad!" -co-worker------------+