CameraGroup supports cameras opened in different windows or in the
same window, with flexible view and perspective specification.
Clean up mouse click handling via osgViewer. Don't let any camera
"have focus;" this forces events to be reported in window coordinates
and simplifies life. Don't use the osgViewer::View::requestWarpPointer
method; instead use our own code which only deals with window
coordinates.
Make glut and sdl versions work with CameraGroup too.
After the changes that moved the GUI and HUD to a slave camera, the
texture-based fonts wouldn't display. The main fixes here are making
sure that the TXF textures are all loaded into the font cache early,
and explicitly setting the active texture unit in the GUI / HUD
drawImplementation.
Switch to defining PU_USE_NONE and providing our own callback
functions to pui for "get window" and "get window size." A new
WindowSystemAdapter class assigns ID numbers to windows for the
purpose of identifying them to plib; the window size can be extracted
from the osg::GraphicsContext class in all the different
implementations (osgViewer, glut, sdl).
Implement a GraphicsContextOperation that runs code in a particular
graphics context, perhaps in another thread, and provides an
isFinished() method to test if the operation has finished. This allows
us to initialize plib PUI properly if there are multiple graphics
contexts without using fgMakeCurrent(). fgMakeCurrent() can't work in
multi-threaded OSG configurations.
Eliminate fgMakeCurrent() and all its uses, either by using
GraphicsContextOperation or by seeing that it is not necessary.
Attach the GUI camera as a slave camera.
Don't manipulate the OSG state in the drawImplementation() functions
for SGHUDAndPanelDrawable and SGPuDrawable; it's not needed.
From Till:
i started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.
currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there
2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.
3. simplify mode-loading functions (avoid passing around fg_root)
4. avoid supurious MatrixTransform nodes in loaded models
5. fix some memory leaks
Reindent to Stroustrup style.
Make FGPrecipitationMgr an SGSubsystem and remove all references to it
in main.cxx and renderer.cxx.
Use SGGeod::makeZUpFrame instead of a private function in
tileentry.cxx. Rewrite that function, WorldCoordinate, to use
makeZUpFrame too.
This also fixes distortion weirdness in the osgviewer version. That
was caused by osg::GraphicsContext getting in the act on resize events
and adding its own scaling to the projectionOffset of slave cameras!
The LOD far range on the tile entry scenegraph node was initialized to
0. This meant that any traverals of active children that happened
before the tile manager updated the node would ignore the node
altogether. Among these is the groundcache traversal which was failing
at startup even though scenery was loaded.
Also added a function to dump scene graph nodes to files; very handy
in gdb.
This uses the osgViewer infrastructure instead of setting up and osg::SceneView.
When the same change is made for glut, much of render.cxx can be deleted.
file. Possible uses of this functionality could include converting the
model to some other format or coordinate system for use in some other
visualization or simulation.
Turn OPENSCENEGRAPH_MAJOR_VERSION, OPENSCENEGRAPH_MINOR_VERSION and
OPENSCENEGRAPH_PATCH_VERSION into a single number for comparisons in the
preprocessor.
src/GUI/gui.h src/GUI/gui_funcs.cxx src/Main/fg_commands.cxx
src/Main/renderer.cxx src/Main/renderer.hxx: Tim Moore:
These patches implement a command to dump the entire OSG scene graph as
a .osg text file. While large, this allows debuggers to really see
what's happening in the scene graph.
configure.ac src/Main/Makefile.am src/Main/fg_os.cxx
src/Main/fg_os.hxx src/Main/fg_os_sdl.cxx src/Main/main.cxx
src/Main/renderer.cxx src/Main/renderer.hxx
src/Network/jpg-httpd.cxx
Added Files:
src/Main/FGManipulator.cxx src/Main/FGManipulator.hxx
src/Main/fg_os_osgviewer.cxx:
Tim Moore: Make use of osgViewer.
src/Input/input.cxx src/Main/renderer.cxx
src/Main/renderer.hxx src/Scenery/scenery.cxx
src/Scenery/scenery.hxx: Move scenery picking into the renderer.
There is most of the required data defined. Also we can better use
the pick visitor that will be needed with th upcommung panel code.