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?

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.

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!!