Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Antialiasing in the Overlay Buffer using WGL

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    6

    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.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Hannover, Germany
    Posts
    1,258

    Re: Antialiasing in the Overlay Buffer using WGL

    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.
    - Michael Steinberg

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    6

    Re: Antialiasing in the Overlay Buffer using WGL

    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.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Hannover, Germany
    Posts
    1,258

    Re: Antialiasing in the Overlay Buffer using WGL

    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).]
    - Michael Steinberg

  5. #5
    Member Regular Contributor
    Join Date
    Apr 2000
    Location
    Redlands, CA, USA
    Posts
    292

    Re: Antialiasing in the Overlay Buffer using WGL

    Read about antialiasing in color index mode.
    Antialiasing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •