PDA

View Full Version : alpha channel from framebuffer in glCopyTexSubImage2D



Mar
12-12-2001, 03:37 AM
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?

Dodger
12-13-2001, 10:09 PM
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.

Mar
12-14-2001, 05:40 AM
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!!