If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Problem with render to texture using pbuffer and alpha

I'm using pbuffer for rendering to texture. In the final texture I want a black/transparent background, as parts of it should be transparent.Rendering things into the texture works fine, and I can display it using 2 triangles. The problem is that the parts which hasn't been rendered to are supposed to be transparent, but they are displayed as black (which I cleared it to, but the alpha seems to be ignored).

I also enable blending, and set up the blendingfunction before rendering the 2 triangles with the final texture, so I think the problem is in the texture/surface. I searched on google and it seems that under regular GL, one must use GLUT_RGBA on glutInitialize to get alpha on framebuffers, but haven't found any similar options for GL ES 1.1. Any one got any tips ?

Re: Problem with render to texture using pbuffer and alpha

The glTexImage2D call is unnecessary since the pbuffer provides its own storage anyway when it's bound to the texture object. You might try requesting a config with at least one alpha bit, i.e. add (EGL_ALPHA_SIZE, 1) to pi32ConfigAttribs.