1
0
Fork 0
Commit graph

101 commits

Author SHA1 Message Date
Curtis L. Olson
a92c697989 I'm doing battle with git ... this should have already been committed with an
explanatory commit log message.  If not ... sorry ... grrr ... git.
2014-02-05 10:15:36 -06:00
Curtis L. Olson
d306e94c1c Add an 'overrideRedirect' flag to the window configuration section. For
multi-headed Gnome based linux systems, this provides an extra hint that we
really wish to open up our full screen window spanning all physical displays.
This works around a kink in the gnome window manager where it tries to "lie"
to applications about the full screen size assuming most applications don't
wish their windows to span multiple physical displays.
2014-02-05 10:04:18 -06:00
James Turner
b7a9aee796 FGViewer fixes
- ensure active material are cached
 - clear osgDB object cache on exit explicitly
2014-01-29 10:10:53 +00:00
James Turner
1a372d9366 Update image-server logic.
- no dependency on libJpeg or Simgear
- no duplicate rendering of the scene (uses a draw callback)
- supports other image types, eg PNG
- threaded so doesn't block the main loop ever
2014-01-27 09:08:34 +00:00
James Turner
49a0398fc6 Make lifetime of CameraViewportListener explicit.
MSVC is warning on this usage, as is the Mac release build. Working
around the issue for the moment.
2014-01-18 18:49:03 +00:00
James Turner
9993e0a588 Fix bug 1286 - mouse scroll-wheel+shift ignored
On Mac, the OS is mapping shift+wheel to horizontal scrolling for
those of us without a mighty-mouse or trackpad. Detect this case
and map back to vertical scrolling inside FlightGear for the moment.

https://code.google.com/p/flightgear-bugs/issues/detail?id=1286
2014-01-13 21:08:32 +00:00
James Turner
4d0eeb8184 Reset work, fix time-slew on OSG event handling. 2014-01-13 20:13:34 +00:00
James Turner
7316360421 Clear the custom OSG notify logger on shutdown.
Should avert crashes due to order of static destruction.
2014-01-12 17:18:35 +00:00
James Turner
43358a2418 Fix a crash where we show a message-box on start.
Don't assume we got as far as creating a viewer when destroying
the renderer.
2013-12-21 15:31:27 +00:00
James Turner
24c1129140 Bugfix: avoid sky colour errors when vis < 1000m
(needs the accompanying Simgear change in SGSky)
2013-12-19 17:18:09 +00:00
James Turner
52f2f5ff78 Bugfix: remove the (totally broken) skyblend option 2013-12-19 14:53:39 +00:00
James Turner
12ea6824eb Rembrandt: fix sky color at altitude.
Don't override global clear color in the Lighting stage. Should fix ugly 'circle' appearing due to sky sphere being clipped when above 32000 ft.

Fix suggested by Emilian H.
2013-12-17 13:56:26 +00:00
James Turner
0dcfd361a4 Kill an obsolete static in the osgViewer wrapper. 2013-12-09 21:47:18 +00:00
James Turner
0bad1258a3 Reset: clear the viewer scene.
On renderer shutdown, clear the viewer scene completely.
2013-12-07 15:06:39 +00:00
James Turner
bb0aee4c02 Renderer: get rid of static scene references. 2013-12-06 17:38:23 +00:00
James Turner
7ff9792b96 Reset: listener cleanup 2013-12-04 09:11:26 +00:00
James Turner
875227057c Structural work (init + shutdown) for new reset system.
The new approach is still work in progress (compile time option) and 
non-functional, existing reset still works.
2013-11-19 17:38:51 +00:00
James Turner
d2962ffb2d Reset: refactor static CameraGroup ownership 2013-11-16 13:02:47 +00:00
James Turner
af40bcb60e Reset: explicit close-window function.
Allow orderly shutdown of OSG before cxa_finalize
2013-11-12 22:57:13 +00:00
James Turner
58fa30b24d Reset: uninstall deletion-manager 2013-11-12 22:55:50 +00:00
James Turner
2322fca9c9 Reset: guard against NULL HUD / lighting 2013-11-12 22:51:10 +00:00
James Turner
71a8eac8bd Reset: view manager can be be shutdown. 2013-10-29 23:02:15 +00:00
James Turner
6845ff56f3 Fix download rate on splash screen. 2013-10-21 23:04:23 +01:00
James Turner
46e8c65612 Expose OSG notify severity at runtime.
Define a new property /sim/rendering/osg-notify-level and listen
to it, so we can update the notification level at run time.
2013-10-20 09:44:38 +01:00
Thomas Geymayer
e4b8e1ea07 Trigger segfault/stacktrace to trace memory corruption.
Catch OSG error message if osg::Reference derived class
is deleted with non-zero reference count and trigger a
segfault to get a stack trace.
2013-10-20 01:26:32 +02:00
James Turner
386d87e098 Cleanup exit handling.
Replace many lingering calls to exit() from the code,
replacing most with exception throws, which can be
caught by the existing mechanisms.

Update the option-parsing code to return an explicit
value indicating what to do (e.g., exit status to return
to the shell).
2013-10-15 22:16:50 +01:00
James Turner
ad4834c651 Splash-screen feedback on scenery download. 2013-09-30 16:36:13 +01:00
Tom Paoletti
81cd33e2fa Performance optimization: empty() instead of size()>0
empty() is guaranteed to be constant complexity for both vectors and lists, while size() has linear complexity for lists.
2013-08-19 09:01:59 +01:00
James Turner
77768e2698 Assume OSG version 3.0 as a minimum 2013-07-29 22:54:25 +01:00
Thomas Geymayer
ba088d9f1e Fix warnings identified by gcc. 2013-07-04 23:07:36 +02:00
James Turner
b1b6d2f6e2 Namespace fixes for std::string 2013-06-27 09:53:12 +01:00
Thomas Geymayer
07e9b48344 Preserve current view on reset/reinit/reposition 2013-06-22 17:07:11 +02:00
James Turner
b2d02c3970 Restrict sky-clouds group, avoids skydome picks. 2013-06-22 14:37:33 +01:00
James Turner
a94dce031c GUI picks only traverse nodes with PICK_BIT set.
(Which is all nodes except those which explicitly opt out,
such as lights, skydome, for the moment)
2013-06-22 14:36:11 +01:00
James Turner
312be5410a Object names for more scene-graph nodes. 2013-06-22 14:34:03 +01:00
Thomas Geymayer
0239e9c8c8 Fix cursor hide timeout if hovering on canvas windows 2013-06-21 22:00:09 +02:00
Thomas Geymayer
6a3354cb15 Do not crash if event has no graphics context assigned 2013-05-16 23:06:52 +02:00
Thomas Geymayer
64ab1e96ee Forward simulation time to osgViewer. 2013-05-10 01:13:59 +02:00
Thomas Geymayer
d9881aecf8 Allow Canvas placed on 3D objects receiving mouse events.
- Add option 'capture-events' to canvas aircraft and scenery
   placements to allow events being forwarded to the respective
   canvas.
 - Clean up and restructure parts of the mouse event/picking
   handling to support forwarding events to canvasses.
2013-05-09 21:38:40 +02:00
James Turner
f2c267f5d7 MouseInput changes to support hover.
This adds the framework for platform cursor implementations; Windows and X11 to be done.
It also extend the mouse-input code to generate hover events suitable for driving tooltips.

Note there should be no visible functionality change from this commit, since everything
is inactive until fgdata changes are made.
2013-03-04 23:35:30 +00:00
James Turner
1898449949 Map OSG notification system to Simgear logging.
With this, OSG notifications can be captured / buffered in-line with our other log messages, which should help debugging and feedback.
2013-02-07 16:01:36 +00:00
James Turner
0729b0806e Fix numeric keypad support on Mac.
Comments in the code imply osgViewer always sends 'num-lock'-off codes, but that is not the observed behaviour with Cocoa. So adding mappings for the num-locked codes on Mac, which is what people actually want at the moment.
2013-01-31 18:42:34 +00:00
James Turner
ac696a9601 Set preview mode when using --fgviewer 2013-01-31 16:51:06 +00:00
James Turner
487638be7f Restructure positional finalisation for sim-reset.
Make position finalisation happen in the same phase as scenery load, i.e as a task during the main loop, instead of during the init loop. This is compatible with the existing reset logic. Unfortunately more work is needed; the environment code doesn't update the local station quickly enough on reset. (Fixing that is next!)
2012-12-15 15:25:45 +00:00
Thomas Geymayer
4bf4754f7b Allow Canvas Windows to be resized by dragging
- Setting 'resize' property to true on canvas::Window shows
   resize icons and exposes requested size to the property
   tree. This can be used eg. from Nasal to actually resize
   the window and/or show a preview of the resized window
   while resizing.
 - Event handling now ignores events which have already
   been handled. Before eg. clicking inside a window
   also caused picking to be performed inside the
   scene which is for sure not the expected behaviour.
 - Also forwards scroll wheel events from canvas::Window.
2012-12-13 14:12:29 +01:00
ThorstenB
57410852b9 Base fullscreen detection on window decoration
rather than window size, since the size of full screen windows can change:
e.g. Xinerama mode automatically resizes fullscreen windows to cover the
area belonging to a single display only - so the
"(Xinerama) screen area == window size" check always failed - even in
fullscreen mode.
2012-11-27 00:02:28 +01:00
James Turner
9632bfcfd6 View-manager: update globals automatically.
Make the global view-manager pointer be controlled by the instance.
2012-11-20 13:33:20 +00:00
ThorstenB
a784443a24 Remove static property dependencies
preventing us from wiping properties on reset/reinit/subsystem recreate.
(more work required for "native_gui" and "ATC-Outputs" protocols)
2012-11-18 16:35:54 +01:00
ThorstenB
1f1dd1fa16 viewmgr: fix mixed up white-spaces/indentation
(content otherwise unchanged)
2012-11-18 13:23:10 +01:00
ThorstenB
d761da248f viewmgr: stash properties for better performance 2012-11-18 13:17:07 +01:00