glCopyTexSubImage2D-Question

Hello,

in my app I want/have to render clouds with impostors, so I somehow have to render the cloud as texture.

This works fine, also copying it from the framebuffer to texture (glCopyTexSubImage2D()), but the alpha does not work, what you see is a cloud on a quad with black background, not at all transparent.

I guess, for alpha to work the framebuffer has to be in GLX_RGBA format (attrib list for glxChooseVisual() ), and there has to be a “GLX_ALPHA_SIZE, 1” in it. But when i put it there, the programm crashes due to inability to create a visual context for OpenGL.

Also I read somewhere that the framebuffer HAS to be in 32 bit RGBA format, not 24 and not 16 but definitely 32. How do I achieve this? Someone once told me that under linux, rendering with more than 16b color is not possible at all… if this is true, I guess that cloud impostoring with linux is impossible?

Can someone help and explain?

Regards
Jan

after glGetIntegerv(GL_ALPBA_BITS, &number) number is 0, so at least the problem really seems to be that the framebuffer has no alpha…

Jan

call glxinfo from cammand line. It’ll give you all of the valid formats for your current display color depth.

test

Modify the X config file to run the server in 32bpp if you want to get an RGBA visual. I haven’t seen an app that requires this till now though(not even games like q3a) so I doubt this is necessary for what you’re trying to do. I might be wrong though…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.