[osg-users] Render to texture ONLY?

Chris Thomas cthomas at soasta.com
Thu Aug 18 04:19:44 PDT 2016


I have an existing app I am developing, which itself is based on OpenGL. It uses an API that provides a 3D windowing system, with different media being displayed on planes, within this 3D space. All good...

Except, its API does not offer anything near the flexibility, and ease of use of OSG. So.. how to use OSG within this app.

All of the examples I have seen so far, use a very similar patern, of the ilk....

osg::ref_ptr<osg::Node> cessna = osgDB::readNodeFile( "cessna.osg" );
viewer.setSceneData( cessna.get() );
return viewer.run();

This is great, in that its very easy to get going, but its thew viewer() that is causing issues for me. Ideally the viewer would be able to render to a texture, rather than to a screen, or window on a screen. I basically need a headless 3D process running, where the OSG output is going to a texture.

Are there any examples of how to do this? Once I have a texture, I can easily copy its contents to my apps planes.

Thank you!


Read this topic online here:

More information about the osg-users mailing list