Hi Oliver, I'd recomend using the osg::CameraNode to using FBO's. If you want to jump off and code FBO support yourself then I'm afraid your on your own, I don't have the time to hand hold on this stuff.
Robert. On 7/6/06, Oliver Kutter <[EMAIL PROTECTED]> wrote:
Hi Robert, thanks for the testing. Now another question concerning FBOs. How can I realize the following OpenGL code with openscenegraph? I have no idea how to read out the texture at the COLOR_ATTACHMENT_0 of the fbo with openscenegraph, because I don't have the id of the fbo object and I'm not familiar enough with openscenegraph. I'm using the osgProducer::Viewer. ------- // fbo and its render target (texture) has been setup -> "fboID" is the fbo id. unsigned char texContent [512 * 512 * 3]; glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboID); glReadBuffer(0x8CE0); // read out texture at COLOR_ATTACHMENT_0 glReadPixels(0, 0, 512, 512, GL_RGB, GL_UNSIGNED_BYTE, texContent); // read out the pixel glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); ------- regards, Oliver Robert Osfield schrieb: > Hi Oliver, > > Just tested things under Linux with Nvidia graphics and it works fine > on a single head. > > Running the app with the --image over two graphics cards, with a > seperate context for each results in some syncronization issues when > using fbo, but perhaps this is to be expected, and the code probably > needs code with this in mind. > > However, this isn't the problem you are seeing which quite likely is > down to an ATI driver or hardware issue, or perhaps some setting that > isn't be set, but on Nvidia defaults to something useful anyway. I'd > suspect the former though. > > Robert. > > On 7/4/06, Oliver Kutter <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I had a look at the prerender example. When I started the example (using >> the framebuffer) with >> >> ./osgprerender --fb --image dumptruck.osg >> >> everything is fine. But when I use a framebuffer object, like this, >> >> ./osgprerender --fbo --image dumptruck.osg >> >> the image has some artifacts, and I don't why? It seems, that the image >> has only 256 colors. Has someone an idea? In our research group, we use >> ATI graphics cards. Could it be, that NVidia cards has no such problems? >> >> Here are some screenshots with and without the artifacts. >> >> http://getwww.uni-paderborn.de/~kutter/artefacts.png >> <http://getwww.uni-paderborn.de/%7Ekutter/artefacts.png> >> http://getwww.uni-paderborn.de/~kutter/no_artefacts.png >> <http://getwww.uni-paderborn.de/%7Ekutter/no_artefacts.png> >> >> bye >> Oliver >> >> Robert Osfield wrote: >> > Have a look at the osgprerender example, it has a code path that does >> > the read back, the jist of it is to attach na osg::Image to the RTT >> > CameraNode. >> > >> > On 6/30/06, Oliver Kutter <[EMAIL PROTECTED]> wrote: >> >> Hi all, >> >> >> >> I'm a newbie in OpenSceneGraph. >> >> I played around with the examples and I have a question concerning >> >> the "osgfbo" example in osg-1.0. The cow is rendered into a texture >> >> and that texture is mapped to the polygon. Now my question: The >> >> texture is the render target of the framebuffer object. Is there any >> >> way I can get an image of that texture and save it to harddisk? >> >> >> >> regards, >> >> Oliver >> >> >> >> _______________________________________________ >> >> osg-users mailing list >> >> [email protected] >> >> http://openscenegraph.net/mailman/listinfo/osg-users >> >> http://www.openscenegraph.org/ >> >> >> > _______________________________________________ >> > osg-users mailing list >> > [email protected] >> > http://openscenegraph.net/mailman/listinfo/osg-users >> > http://www.openscenegraph.org/ >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://openscenegraph.net/mailman/listinfo/osg-users >> http://www.openscenegraph.org/ >> > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
