Hi Steven, try setInternalTextureFormat(GL_RGBA32F_ARB); setPixelFormat(GL_RGBA); setDataType(GL_FLOAT);
Rudi -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Guy Sent: Wednesday, March 11, 2009 7:23 AM To: [email protected] Subject: Re: [osg-users] GL_RGBA32F_ARB Pixel Buffer Hi Steven, I'm not so sure, but maybe you should try to set the render target implementation to FRAME_BUFFER_OBJECT, as done in the prerender example? What graphics card do you use? Does it work for you with GL_RGBA16F_ARB? Guy. I'm getting all 0s for my pixel buffer when I use GL_RGBA32F_ARB as the pixel format. It works fine with GL_RGBA. This is how I set it up: i = new osg::Image(); i->setPixelFormat(GL_RGBA32F_ARB); i->setDataType(GL_FLOAT); camera->attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER0), i.get()); camera->setRenderOrder(osg::Camera::PRE_RENDER); camera->setRenderTargetImplementation(osg::Camera::PIXEL_BUFFER); Then when I try to retrieve the pixel values: if (_image.valid() && _image.get() && _image.get()->data()) { float *tempData = (float*)_image.get()->data(); for (int i = 0; i < sliceVPX * sliceVPY; i+=4) { debug<<Debug::info<<"Pix ["<<i<<"] = "<<tempData[i]<<", "<<tempData[i+1]<<", "<<tempData[i+2]<<", "<<tempData[i+3]<<"\n"; } } I get all zeros. Can anyone help me out. again using GL_RGBA and GL_UNSIGNED_BYTE works fine. I'm using OSG 2.2 ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8184#8184 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

