Problem using palette with image texture map [message #43062] |
Wed, 23 March 2005 11:30 |
jargoogle
Messages: 11 Registered: April 2004
|
Junior Member |
|
|
Hello,
I'm having problems with an application I developed on a windows
system and am now trying to make work via an x-window terminal. I make
use of texture mapping to display an image with a polygon. On windows,
the image displays appropriately. On an x-terminal, the polygon is
filled with flat gray.
The problem appears to be the palette object I have added to the
image object. If I remove the palette object from the image, the
subsequent texture mapping works and the image is displayed. However,
I've lost to ability to control the color of the image. Sure, it's
modulated by the color value of the parent polygon, but I get a couple
hundred shades of the same color. I want the image shades to be mapped
to colors via the color table.
Works on a 'Win' device:
1) palette belongs to image object
2) image object serves as texture map
3) color mapping: palette(polygoncolor * imagecolor) (DESIRED)
On 'X' device
1) Must remove palette from image
2) Can add palette to polygon along with image texture
3) color mapping: palette(polygoncolor) * imagecolor (UNDESIRED)
I feel this has something to do with color mapping differences
between a windows device and an x windows device. I've checked that my
destination object is using the RGB model - so it doesn't seem to be an
RGB vs Index issue. I've tried with and without color table bypassing
on the X device with no observable effect on the results.
Here's the help, /dev info:
On windows: help, /dev
Current graphics device: WIN
Screen Resolution: 1280x800
Simultaneously displayable colors: 16777216
Number of allowed color values: 16777216
System colors reserved by Windows: 0
IDL Color Table Entries: 256
NOTE: this is a TrueColor device
Using Decomposed color
Graphics Function: 3 (copy)
Current Font: System, Current TrueType Font: <default>
Default Backing Store: None.
On the X: help, /dev
Current graphics device: X
Server: X11.0, The Cygwin/X Project, Release 60801000
Display Depth, Size: 24 bits, (2880,1200)
Visual Class: TrueColor (4)
Bits Per RGB: 8 (8/8/8)
Physical Color Map Entries (Emulated / Actual): 256 / 256
Colormap: Shared, 16777216 colors. Translation table: Bypassed
Graphics pixels: Decomposed, Dither Method: Ordered
Write Mask: 16777215 (decimal) ffffff (hex)
Graphics Function: 3 (copy)
Current Font: <default>, Current TrueType Font: <default>
Default Backing Store: Req from Server.
What color, index, whatever keyword am I missing somewhere?
Thanks,
John.
|
|
|