We use OpenGL and we really need stencil buffer in FBO. We tried to use
GL_EXT_packed_depth_stencil
and it works great on ATI! But we could not make it work on GeForce 6600 with latest drivers installed… Although OpenGL shows that this extension is supported.
We get the following error when we’re getting framebuffer status after creation:
FRAMEBUFFER_UNSUPPORTED_EXT
Also when we’re trying to create depth buffer and stencil buffer separately it also does not work.
Looks like GL_EXT_packed_depth_stencil is the only way for us to get to stencil buffer on this videocard.
Maybe someone had same situation?
Has anyone successfully created stencil buffer in FBO on NVidia?
If so, could you please post code that you use to create the framebuffer?
Thanks everyone. We won the battle for stencil creation, but now have strange results in using it/
No matter how we fill the stencil - glClear() with specific value, or by drawing into it - same thing. If then we’re using mask with NOT_EQUAL, LESS or GREATER - stencil test never passes.
but if we set EQUAL, test passes always, no matter what is beeing compared to values in stencil.
plus it works on ATI just fine.
We might be missing something, or it might be really problems with drivers.
Can anyone share really simple example of using stencil in FBO that can be compiled and run, to see if it really works here.
When I was working on something related to this about a year ago, I found that packed_depth_stencil worked fine on a Quadro 4500 under XP, but produced garbage under Linux. Which OS are you on?
There were problems with the stencil mask reported on this forum when the windows’ pixelformat has no stencil and the FBO has.
The stencil mask was set to zero although it should be ~0 for all bits per default.
Try explicitly setting the stencil mask once during init.