Hi Roman, I haven't tried using FBO with GLES2 so can't comment on specifics. The best I can do is suggest having a look at the OpenScenegGraph/src/osg/FrameBufferObject.cpp when you run your app with a debugger or added debug messages to see what the class is doing when you using with X11/OpenGL vs GLES2. It could be that feature is not detected and setup correctly under GLES2 by the OSG, or perhaps simply that GLES2 driver doesn't fully support FBO or the specific format you want to use.
Robert. On 16 July 2013 13:08, Roman Grigoriev <[email protected]> wrote: > Good day! > I try to add fbo support to GLES2 example on svn trunk but bot black quad > My code works on linux X11 but it doesn't work on GLES2 > > Code: > > osg::ref_ptr<osg::Texture2D> visual_tex = new osg::Texture2D; > visual_tex->setTextureSize( 256,256); > visual_tex->setInternalFormat(GL_RGBA); > > visual_tex->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); > > visual_tex->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); > visual_tex->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); > visual_tex->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE); > osg::ref_ptr<osg::Camera> colorCamera1 = new osg::Camera; > colorCamera1->setViewport(0,0,256,256); > > colorCamera1->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); > colorCamera1->setProjectionMatrixAsPerspective(15, 4.0f/3.0f,2.0f, > 12000.f); > //colorCamera1->setCullMask(IS_VISIBLE_MASK); > colorCamera1->setClearColor(osg::Vec4f(0.0f,0.0f,1.0f,1.0f)); > colorCamera1->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); > colorCamera1->setReferenceFrame(osg::Transform::ABSOLUTE_RF); > colorCamera1->setRenderOrder(osg::Camera::PRE_RENDER); > colorCamera1->attach(osg::Camera::COLOR_BUFFER, visual_tex.get()); > > colorCamera1->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); > colorCamera1->addChild(viewnode); > _root->addChild(colorCamera1.get()); > > > > in my hud camera if I change visual_tex to another preloaded texture all > works fine. > And I don't have error messages about incomplete attachment. > Thank you! > > Cheers, > Roman[/code] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=55228#55228 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

