View Full Version : FBO Question

08-09-2005, 07:44 AM
I set up a FBO with depth, rgba8 and depth texture attached. can I use glCopyTexImage to copy the stencil values in another texture?

I want to use the stencil values in the stencil texture to render them as alpha values and use these alpha values?

Can someone tell me something ?

08-09-2005, 10:34 PM
You mean rgba8, depth and stencil?
First make sure stencil does work with FBO. I remember someone posted that it didn't in early implementations.
Stencil can not be accessed with glCopyTexImage.
You could use glReadPixels with GL_STENCIL_INDEX and glTexImage2D to GL_ALPHA instead.

08-10-2005, 12:31 AM
what do you mean with early implementations

08-10-2005, 01:13 AM
Beta drivers or unfinished FBO specs.
Does it work for you?

08-10-2005, 01:20 AM
hmm I have to check

08-10-2005, 01:26 AM
indeed an attempt to create an stencil renderbuffer produces a complete fbo but an invalid enum error

the same appears if I create a "stencil" texture - is there any solution to this?

08-12-2005, 04:23 AM
I think stencil renderbuffers are not possible on todays hardware. But I heard the ARB is working on an extension to provide a packed depth-stencil buffer format...