View Full Version : Color Index mode in opengl
03-31-2003, 02:40 AM
When i run my opengl program in Color Index Mode i get the following error:"Glut:Fatal Error:visualities with necessary capabilities not found".What should i do?
[This message has been edited by shobha (edited 03-31-2003).]
03-31-2003, 05:05 AM
Means GLUT hasn't found a pixelformat which supports the necessary capabilities your app requested.
Check if other display modes support color indexed mode and the other requirements you have in the pixelformat flags.
(On Windows) Microsoft's GDI generic implementation supports color indexed renderering, most hardware doesn't (anymore).
Consider color indexed to be outdated.
04-01-2003, 01:52 AM
If want to get color index of any color in RGBA mode, what should i do?
04-01-2003, 02:17 AM
Sorry, your question desn't make sense.
There is no color index in an RGBA mode.
A color index is an index into a palette containing RGBA values. The index is normally 8 bits, means you can distinguish 256 colors.
RGBA (true color) normally uses 8 bits PER COLOR CHANNEL (4*8 bits) or up to 32 bits per channel (128 bits) in the newest float buffer extensions.
Is your question how to reduce an RGBA true color image to an 8 bit color indexed image?
(This hasn't much to do with OpenGL then.)
Some keywords to look for algorithms to convert RGBA images to color indexed ones: dithering, Foley, error diffusion, RGB332 palettes, median cut, octree palette reduction.
[This message has been edited by Relic (edited 04-01-2003).]
04-01-2003, 02:46 AM
could i know how to use color palettes in RGBA mode. b'coz i want to use no. to a colour & when ever i want that colour i use that colour number.
[This message has been edited by shobha (edited 04-01-2003).]
04-01-2003, 04:17 AM
You want an indexed-color application within an RGBA environement (typical desktop settings), right?
04-02-2003, 06:42 PM
I am doing a graphics editor in linux using openGL. whenever i want to select a color i should show a palette. when i select a color, i use its color no.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.