[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

459.0. "8 bit window on 3520?" by USHS11::KAMPS () Wed Mar 22 1989 14:04

    Is is possible to create a window which is 8 bits deep on a 24 plane
    3520?  A customer's application which executes properly on a
    3200, 8 bit, will not let him create an 8 bit window on the 3520.
    
    Must is be 24 bits deep?
    
    thanks
    Bill
    
    

T.RTitleUserPersonal
Name
DateLines
459.1Just say yes. Firefox has multiple hw color mapsSTAR::BMATTHEWSWed Mar 22 1989 14:4017
Yes, you can create 8 bit deep windows on the firefox and have it have it's
own hardware color map seperate from the 24 plane true color windows. The
default visual for 24 plane firefox's is 24 plane true color but there is also
an 8 bit pseudo color visual that is passed back in connection setup from the
server to the client. I suppose this information is kept by xlib in it's
display structure. If you use the 8 plane visual when creating your window
all will work fine.

Firefox is the first machine to offer multiple hardware color maps. I would
like to know what people's feelings are on how beneficial multiple hardware
color maps are for 24 plane systems?, 8 plane systems? Also at what cost
are multiple color maps worthwhile. In these days of cost/performance is
everything it is hard to judge the cost/benefit tradeoffs for features like
multiple hardware color maps.

						Bill

459.2Multiple H/W color maps are needed in scientific space at leastLDP::WEAVERLaboratory Data Products/ScienceWed Mar 22 1989 16:0011
    Multiple H/W color maps are definitely worthwhile, particularly to the
    scientific community where there is often the need to display multiple
    images or multiple 3D graphics that may be color coded. There are times
    when you want images to use the same color map and times when you want
    to use different color maps.  I have written a DECwindows application
    that demonstrates this with images within the limitations of an
    8 plane system (I am waiting for our Firefox to see what changes
    will have to be made).
    
    						-Dave

459.3Must be doing something wrong thenUSHS11::KAMPSWed Mar 22 1989 18:2546
    re: .1
    
    That's what me customer thinks he tried.  I will give you the
    relevant calls that he is using to create and install the new
    color map, as well as the errors he gets when running the applications.
    
    	visual_info.screen = screen;
    	visual_info.depth = image_depth;
    	visualList = XGetVisualInfo(display,VisualScreenMask |
    		      VisualDepthMask,&visual_info, &visualsMatched);
    
    	visual = visualList[0].visual;
    
    	colormap = XCreateColormap (display, RootWindow(display,screen),
    			visual,
    			AllocNone);
    
    	XInstallColormap (display,colormap);
    
    	back_color.pixel = BlackPixel(display,screen);
    	trace_color.pixel=WhitePixel(display,screen);
    
    	XSetArg (create_window_arglist[4], DwtNdepth, win_depth);
    	XSetArg (create_window_arglist[5], DwtNcolormap, colormap);
    
    	draw = DwtWindowCreate(work_area,
    		"drawArea",
    		create_window_arglist, 6);										
                                                                   
    
    
    
    
    There are a few other Xsetarg calls which set the position
    and height. Image_depth = 8, and win_depth = 8.
    
    The error he gets is XProtocol error detected by server; parameter
    mismatch.  Failed request major op code 1 X_createWindow. 
                                                             
    If you see where we went wrong Id appreciate knowing,
    
    thanks
    Bill
    
    

459.4definitely worthwhile to have more than one hw color mapPSW::WINALSKIPaul S. WinalskiWed Mar 22 1989 22:045
Many's the time I wished that I could run an application using 256 colors
without having all the other windows on the screen get zorched.

--PSW

459.5Hope this helps...DECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Thu Mar 23 1989 00:2827
    The problem is that you are not doing anything with the visual info that
    you got except creating a colormap with it.  At least not showing here.
    Somehow you need to tell X which visual to use when creating a new window.
    I suspect that you need to find a create_window_arglist argument which
    specifies the visualID.  I would guess that the toolkit uses that default
    visual if you don't specify it.  Since you specified a colormap with
    a different visual from what the window is created with, that would give
    you a match error.  Also, I think you would get a match error if the
    depth you specified did not was not available with the specified visual.
    Since you are taking the default visual, which expects 24 planes, but
    specifying 8-planes, this would also generate the match error.
    
    And finally, while it is true that the XInstallColormap is probably
    the right thing to do here (since the window manager does not support
    the concept of multiple active colormaps) you should be aware that
    according to the InterClientCommunicationConvention manual, you are
    not supposed to do InstallColormap yourself, but rather let the window
    manager do it.  (Trouble is, that means you have to click on the window
    to get the right colors, at least in V5.1.)
    
    If you look in the X examples conference, you can find a colorwheel
    program which I posted which can demonstrate some of the techniques
    required to support using the non-default visual.
    
    Burns