Hi,

I'm facing a problem when creating my FBO :


Code:
Warning: detected OpenGL error 'invalid operation' at After Renderer::compile
RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd6
Warning: FrameBufferObject: could not create the FBO
RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x0
Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..)
Warning: FrameBufferObject: could not create the FBO
RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x0
PixelBufferWin32::bindPBufferToTextureImplementation, wglBindTexImageARB error: 
LÆopÚration a rÚussi.

Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..)
Warning: detected OpenGL error 'invalid operation' at end of SceneView::draw()
Warning: detected OpenGL error 'invalid operation' at start of 
State::apply(StateSet*)
Warning: detected OpenGL error 'invalid operation' at end of 
State::apply(StateSet*)



My code :


Code:
p_renderTexture = new osg::Texture2D();
p_renderTexture->setTextureSize(200, 200);
p_renderTexture->setInternalFormat(GL_RGBA_INTEGER_EXT);
p_renderTexture->setSourceFormat(GL_RGBA32I_EXT);
p_renderTexture->setSourceType(GL_BYTE);
p_renderTexture->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::NEAREST);
p_renderTexture->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::NEAREST);
p_renderTexture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
p_renderTexture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
p_renderTexture->setDataVariance(osg::Object::DYNAMIC); 
p_renderTexture->setUseHardwareMipMapGeneration(false);
p_renderTexture->setResizeNonPowerOfTwoHint(false);




I think there is something wrong with that :

Code:
p_renderTexture->setInternalFormat(GL_RGBA_INTEGER_EXT);
p_renderTexture->setSourceFormat(GL_RGBA32I_EXT);
p_renderTexture->setSourceType(GL_BYTE);




For another application, I use :


Code:
p_renderTexture->setInternalFormat(GL_RGBA32F_ARB);
p_renderTexture->setSourceFormat(GL_RGBA);
p_renderTexture->setSourceType(GL_FLOAT);




which works well to render to a "floating point" FBO


Thanks for your help !

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to