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: alpha channel from framebuffer in glCopyTexSubImage2D

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    Castellon, Spain
    Posts
    6

    alpha channel from framebuffer in glCopyTexSubImage2D

    Hi, all
    I'm trying to make an impostor of a tree, so
    I render this object and read a subregion of the framebuffer with glCopyTexSubImage2D(GL_TEXTURE_2D,0,0,0,x,y,width, heigth);
    I'm loading in a RGBA texture.

    But it's impossible to get the alpha channel from the framebuffer.
    Before rendering my object, I have cleared the alpha channel of the buffer by
    glClearColor (1.0,1.0,1.0, 0.0) but it doesn't work either.

    Can anybody help me, please?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Lubbock, TX, USA
    Posts
    197

    Re: alpha channel from framebuffer in glCopyTexSubImage2D

    What kind of graphics card are you using and what type of frame buffer did you create? It sounds like there's no destination alpha in your frame buffer.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    Castellon, Spain
    Posts
    6

    Re: alpha channel from framebuffer in glCopyTexSubImage2D

    Hi,

    I've solved my problem at last!! Thank you for your help.
    The problem was that I didn't stored 32 bits per pixel. I've just put this condition on windows, I've solved my problem.

    Thank you!!

Posting Permissions

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