Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any know about color allocation?

Status
Not open for further replies.

TheBrewer

Programmer
Jun 29, 2000
3
US
When one of the applications I'm working on is approximately 2/3rds of the way through its startup routine, it bombs out and gives the following error: X error ... BadMatch (invalid parameter attribute) and on the next line: X_PolyFillRectangle. I know from past experiences that this has to do with color allocation, ie when another application like xemacs is running on the sgi, my application doesn't like to work, giving me this error. I'm at an Onyx2 station however, the mother of all sgi's and I have nothing else running, and I have no idea how to change the color allocation. Any one know how, or have any ideas on where to look?
 
Its a good five years since I've done any X-windows programming but from what I
remember have a look for the ColourMap functions (I can't be more specific than that
I'm afraid).

I think the problem's caused by the depth of the ColourMap, if the SGI display is set to 256 colours then thats all you can have, if you try to allocate a 257th colour the thing goes pair-shaped.

You may want to look into allocating a private colour map which will give you your own local copy to play with.

Hope that points you in the right direction. Any more queries mail me at
Delete.Me@btinternet.com

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top