Hi,

I've got the following 2 errors when frame() is called, when I've got a stencil 
buffer attached to my camera:

RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd6
Warning: detected OpenGL error 'invalid enumerant' at end of SceneView::draw()

My RTT code looks like this:


Code:
// Color buffer
Texture2D *texture = new Texture2D();
texture->setTextureSize(320, 200);
texture->setInternalFormat(GL_RGBA);
camera->attach(osg::Camera::COLOR_BUFFER, texture);

// Stencil buffer
Texture2D *textureStencil = new Texture2D();
textureStencil->setTextureSize(320, 200);
textureStencil->setInternalFormat(GL_STENCIL_INDEX8_EXT); // I've tried 
GL_STENCIL_INDEX, too
camera->attach(BufferComponent.STENCIL_BUFFER, textureStencil);

viewer->frame();



In the osgpackeddepthstencil sample, I can see the following comments:


Code:
    if(usePDS)
    {
        rttCamera->attach(osg::Camera::PACKED_DEPTH_STENCIL_BUFFER, 
GL_DEPTH_STENCIL_EXT);
    }
    else
    {
        // this doesn't work on NVIDIA/Vista 64bit
        // FBO status = 0x8cd6 (FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT)
        rttCamera->attach(osg::Camera::DEPTH_BUFFER, GL_DEPTH_COMPONENT);
        rttCamera->attach(osg::Camera::STENCIL_BUFFER, GL_STENCIL_INDEX8_EXT);
    }



As I am using Windows 7 x64 with an nVidia card, I tried setting things up with 
a packed depth+stencil buffer. But I've got the same error.

Any idea?

Cheers,
Fred

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32623#32623





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to