20,741
edits
m (→CanvasPDF) |
mNo edit summary |
||
| Line 47: | Line 47: | ||
Next, we need to set up a separate camera to render a sub-scenegraph to a texture - the corresponding OSG code to accomplish this can be taken from existing OSG examples[http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/examples/osgprerender/osgprerender.cpp][http://minervagis.googlecode.com/svn/branches/releases/1.0.0/Source/OsgTools/Render/OffScreenRenderer.cpp]/tutorials[http://delta3d.org/deltawiki/index.php?title=Tutorial_Render_To_Texture][http://merlin.fit.vutbr.cz/wiki/index.php/OSG_knowledge_base#Rendering_a_scene_to_texture][http://thermalpixel.github.io/osg/2014/02/15/rtt-with-slave-cameras.html][http://beefdev.blogspot.com/2012/01/render-to-texture-in-openscenegraph.html], or we can directly use the ODGauge code in Simgear: | Next, we need to set up a separate camera to render a sub-scenegraph to a texture - the corresponding OSG code to accomplish this can be taken from existing OSG examples[http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/examples/osgprerender/osgprerender.cpp][http://minervagis.googlecode.com/svn/branches/releases/1.0.0/Source/OsgTools/Render/OffScreenRenderer.cpp]/tutorials[http://delta3d.org/deltawiki/index.php?title=Tutorial_Render_To_Texture][http://merlin.fit.vutbr.cz/wiki/index.php/OSG_knowledge_base#Rendering_a_scene_to_texture][http://thermalpixel.github.io/osg/2014/02/15/rtt-with-slave-cameras.html][http://beefdev.blogspot.com/2012/01/render-to-texture-in-openscenegraph.html], or we can directly use the ODGauge code in Simgear: | ||
<syntaxhighlight lang="cpp"> | |||
</syntaxhighlight> | |||
<references/> | |||
== CanvasModel == | |||
{{Custom_Canvas_Element | |||
|baseclass=Image | |||
|elementName=Camera | |||
|elementTitle=Canvas Camera (slaved) | |||
|description=Stub for exposing OSG slaved cameras as a dedicated Canvas element | |||
}} | |||
Next, we need to look at $FG_SRC/Viewer/CameraGroup.cxx to see how slave cameras are set up: | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||