Antialiasing in the Overlay Buffer using WGL

Hi. I am working wih the WGL library in order to set up an overlay buffer. I am using an Oxygen GVX1 video card. I have finally managed to set up a color palette with all the colors I need but I stumbled upon a problem. If I do not enable antialiasing the colors (referring to the color palette I created) are correct but when I enable antialiasing, the colors of my objects change into different colors and make a mess of all my display objects. I use the following code for antialiasing:

glEnable(GL_LINE_SMOOTH);
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);

I found that the color defect problem does not occur when I comment out the first line but antialiasing does not become enabled anymore. Can anyone help me with this problem? Thank you in advance.

Well, I don’t know, but if you loaded up a palette, OpenGL is using that too. So how should OpenGL know which color index to take when it interpolates a color that is not in the table. Maybe there is some pattern you’ll have to follow while sorting your palette entries.

Originally posted by Michael Steinberg:
Well, I don’t know, but if you loaded up a palette, OpenGL is using that too. So how should OpenGL know which color index to take when it interpolates a color that is not in the table. Maybe there is some pattern you’ll have to follow while sorting your palette entries.

Thank you very much for your quick response. Would you happen to know of any references on the net where I can get a better understanding of how to better organize my color palette? I wrote a separate program that creates these palettes so I can easily modify the way it is created. Any help would be appreciated. Thank you for your time.

The book tells me that blending is not available in palette modus. However it is a 1.1 standard book so I’m not used to what v 1.2 of OpenGL is offering to help you though I don’t think that it will be supporting alpha operations on palettes.

[This message has been edited by Michael Steinberg (edited 02-15-2001).]

Read about antialiasing in color index mode.
Antialiasing