PDA

View Full Version : FBO Question



powerpad
08-09-2005, 08: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 ?

Relic
08-09-2005, 11: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.

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

Relic
08-10-2005, 02:13 AM
Beta drivers or unfinished FBO specs.
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=013538
Does it work for you?

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

powerpad
08-10-2005, 02: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?

Overmind
08-12-2005, 05: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...