[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

1313.0. "another firefox color question" by CADSE::UPHAM (Barbara Upham) Mon Aug 21 1989 15:27

I am having a problem getting my colormap set up properly on a
24 plane firefox.  (I have posted a similar note in the firefox
conference.)

I have found the visual for the directcolor map, and created a 
colormap using it.  The problem occurs after I allocate color cells
in my colormap and attempt to use x$store_color the first time.
The error message is:

  X error event received from server: 
	BadAccess - attempt to access private resource
  Failed request major op code 89 X_StoreColors
  Failed request minor op code 0 (if applicable)
  ResourceID 0x0 in failed request (if applicable)
  Serial number of failed request 147
%XLIB-E-ERROREVENT, error event received from server

According to the reference manual, x$alloc_color_cells is successful
if it returns a non-zero value.  I have checked this value in the
debugger and it returns: 47939600.  I looked at examples which seem to
expect that it returns a value of 1.  I also examined the contents of
the pixel array and all the values returned (in my code) were zero, they
were non-zero and increased by a fixed size in the examples.

Any ideas of what this all means?

Thanks for any help!
Barbara  
  


T.RTitleUserPersonal
Name
DateLines
1313.1suggestion?CB750C::BOLGATZMon Aug 21 1989 15:495
    Try XAllocColor - I believe XAllocColorCells allocates read/write color
    cells, which isn't supported on a static/true color machine
    
    Jay

1313.2PSW::WINALSKIMeetings are our most important productTue Aug 22 1989 16:0010
RE: .0

Are you really using a DirectColor visual?  The default visual for Firefox is
TrueColor, not DirectColor.  You can't get read/write color cells on a TrueColor
visual--you should acquire pixel values using XAllocColor().  If you really
are using DirectColor, according to Gettys, Scheifler, and Newman, you have to
use XAllocColorPlanes, not XAllocColorCells, to get read/write pixel values.

--PSW

1313.3CADSE::UPHAMBarbara UphamTue Aug 22 1989 18:3128
RE: .2

Yes, I am using a DirectColor visual.  I know that the DirectColor visual is
read-only, so I no longer use the default visual and colormap.

As, for XAllocColorCells I have an example that works correctly using 
DirectColor (from the Firefox conference) which is why I am really 
frustrated by my inability to tranlate the example into my code (from
C to Bliss). 

Also, SG&N don't seem to be saying that you can't use DirectColor with this 
call since they discuss how the masks work.  (Maybe they are implying that 
using the Planes routine is better?)

I would really like to stick with the color cells if possible since it will
reduce the amount of changes I will need to make for one specific device (it
currently runs on 1, 4, and 8 plane devices).

How about another approach--can I easily find a PseudoColor visual that 
could hopefully suit my needs?

As an aside, when the documentation says the return is successful 
if it is non-zero, do they really mean if it equals 1?

Thanks for the suggestions and advise so far,
Barbara