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 3 of 3

Thread: glClearColor() question

  1. #1
    Junior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Melbourne, Australia
    Posts
    239

    glClearColor() question

    My question is similar to the one asked a while ago here:
    Why id[3] (Alpha component) is 255 after that?

    unsigned char id[4];
    glClearColor(0, 0, 0, 0);
    glClear(GL_COLOR_BUFFER_BIT);
    glReadPixels (10, 10, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, id);

    R, G and B are properly zeroed.

    I have voodoo2, could this be the reason?

    Thanks for your help.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: glClearColor() question

    Are you sure you have a destination alpha channel?

  3. #3
    Junior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Melbourne, Australia
    Posts
    239

    Re: glClearColor() question

    no...
    So if i get it right the problem is I don't have 4th component of my color buffer for alpha values...?

    Previously I only needed source alpha, I thought it's obvious it's possible to use alpha destination.

    My voodoo2 still surprises me , some days ago I also discovered it doesn't support glColorMask()....before I thought it's a basic of OpenGL

Posting Permissions

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