1
0
Fork 0
Commit graph

587 commits

Author SHA1 Message Date
Szymon Acedański
4fd89b0b8f Fixed compilation warning on Mac
IOHIDManagerRegisterDeviceMatchingCallback must not be called with
nullptr as the second argument.
2017-02-25 15:05:09 +01:00
Richard Harrison
60eee7722d Another different fix for the pointer conversion issue.
Based on the comments in the list I think it is better to keep the type that was originally provided as a reference, take the address of it, and store that in a ref_ptr.

Possibly the problem was never compiler related rather OSG related; I'm using 3.5.x and it appears that there are better built in type conversions compared to the target version of 3.2 that we are currently using.
2017-02-17 17:56:32 +01:00
James Turner
478171b8db Testing a different fix for ref-ptr conversion.
This ‘should’ work, but might fail the same as Richard’s
original patch. Let’s find out.
2017-02-16 18:43:58 -08:00
Richard Harrison
bde3dd0644 Canvas texture replacement visitor compiler fix.
Change to use pointers rather than osg::ref_ptr<osg::Group> - based on http://andesengineering.com/OSG_ProducerArticles/RefPointers/RefPointers I think that it is not possible that the scenegraph can be modified between the visitor and the modify, provided that the methods are called after each other like this:

  ReplaceStaticTextureVisitor visitor(name, new_texture);
  branch->accept(visitor);
  visitor.modify_groups();
  return visitor.getPlacements();
2017-02-16 09:16:27 +01:00
Richard Harrison
e48a3d8b32 Replacement Texture visitor modified iterator whilst iterating
The visitor would modify the scenegraph during the traversal by inserting groups; this is not valid when using vectors, and MSVC2015 debug RTL throws an exception when this happens.

The fix is to simply make a list of the textures that need to be modified and modify once the scenegraph traversal has finished.
2017-02-14 18:56:38 +01:00
Torsten Dreyer
994ea1674b replace many auto_ptr by unique_ptr 2016-11-14 22:20:46 +01:00
James Turner
6d0c2070fd Use future-proof SGPath APIs.
Remove uses of .str(), .c_str() and some other methods of SGPath.
Pass SGPath directly where possible, or explicitly convert to the
appropriate 8-bit encoding.
2016-06-28 10:08:38 +01:00
James Turner
03ecac9dbc Work with new SGPath API. 2016-06-22 17:36:05 +01:00
James Turner
de959a14f3 Rename Viewer/viewer.cxx to view
- keep class and file names in sync.
2016-02-17 21:25:39 +00:00
James Turner
fc9c43b48d Remove FontCache from globals.
- access via a singleton instead.
2016-01-03 12:00:15 -06:00
Richard Harrison
0368e9a003 Fix indentation and use naIsNil to determine if _globals is nil 2015-11-29 19:15:24 +01:00
Richard Harrison
9ba892962c Closedown crash prevention 2015-04-10 23:51:32 +02:00
Thomas Geymayer
bd29974683 Canvas: move Window class to simgear. 2014-05-09 16:42:54 +02:00
Thomas Geymayer
5fb7b2e12c Canvas: Now only one global SystemAdapter is used... 2013-12-09 23:13:45 +01:00
James Turner
5a1a1781e2 Reset: ensure FGODGuage shutsdown cleanly.
- remove ODGuage instances during shutdown phase (don't wait until
deletion)
2013-12-06 18:45:45 +00:00
Thomas Geymayer
c4f02cc41e Fix for #1244 (Canvas placements with pick animation). 2013-10-24 01:30:54 +02:00
James Turner
fda64d840e Use helper to validate printf formats.
Simgear contains a new helper to validate format
strings for potentially dangerous replacements, use
it to fix the issues raised by Debian bug trackers.
2013-09-15 19:17:54 +01:00
James Turner
77768e2698 Assume OSG version 3.0 as a minimum 2013-07-29 22:54:25 +01:00
James Turner
b1b6d2f6e2 Namespace fixes for std::string 2013-06-27 09:53:12 +01: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
Thomas Geymayer
eba03b5e46 Allow placing canvas on scenery objects. 2013-03-21 01:16:47 +01:00
Thomas Geymayer
3047c316dc Clean up/simplify NasalPositioned_cppbind
Ensure all FGPositioned related functions return SGSharedPtr
instead of raw pointers to allow automatic conversion to
nasal ghosts without custom helper functions.
2013-03-06 23:21:49 +01:00
James Turner
88a4435cef Remove isReciprocal from FGRunway.
This was a bogus concept, either runways have a reciprocal or not (if singled-ended), really this was simply exposing an artefact of the apt.dat encoding. Change to an API which gives what is actually wanted - the ability to extract an airport's runways without any reciprocals included.
2013-02-28 18:21:29 +00:00
James Turner
1eb8ae1fbf Give the FGAirport class a sane filename.
simple.[cxx|hxx] -> airport.[cxx|hxx]
2013-02-21 11:32:02 +00:00
Christian Schmitt
2013f7149d Some headers missing... ;) 2013-02-07 19:00:54 +01:00
James Turner
4873a28e97 Allow ND rules to occur in the symbols file. 2013-01-02 17:07:28 +00:00
James Turner
851029143e NavDisplay: time-bound the spatial query.
At large search ranges (320 or 640NM range on the 777), the search time can blow up, especially if distant airports are being loaded. Add a time-bounded spatial query, and use it, so performance stays tolerable.
2012-12-30 17:01:48 +00:00
James Turner
a1031b052d NavDisplay - custom symbol support enabled. 2012-12-24 23:13:18 +00:00
James Turner
a6dc2beb4d Make PLAN mode in Boeing NDs possible.
Allow the location of the ND centre to be set from properties instead of always using the acct position.
(I thought I'd supported this option long ago, evidently not)
2012-12-24 17:42:23 +00:00
Thomas Geymayer
258d387d15 Allow setting emission for each canvas placement 2012-11-21 13:07:57 +01:00
Thomas Geymayer
28779e7a51 Update for new simgear Canvas system.
A refactored version of the Canvas system can now be found in
SimGear.
2012-11-04 14:18:31 +01:00
Thomas Geymayer
2ad82a1b60 Move FGODGauge implementation to SimGear 2012-10-19 11:59:36 +02:00
James Turner
4994973ef4 Separate instruments from cockpit displays. 2012-10-05 18:13:50 +01:00
James Turner
2a276ae5d1 Disable panel-extent drawing in hot-spots mode.
To keep the tutorial looking nice, switch off the panel extent outlines for the 2.8 release. Longer-term I should remove the code, or add a separate property if this feature is actually useful.
2012-07-02 11:44:34 +01:00
James Turner
8f10fff8dc Lazy-loading of the 2D panel node.
Sink the 2D panel logic into FGPanelNode, simplifying
renderer.cxx and a few other places. Also allows potential
for unloading / paging of 2.5D panels in the future.
2012-05-16 11:43:09 +01:00
ThorstenB
89b41395d8 Move viewer-related sources to separate folder.
Simple source directory clean-up, so "Main" folder contains fewer stuff
and the list of files in the editors a lot shorter.
2012-04-25 23:28:00 +02:00
James Turner
91f2d0798a Make 2D panel mouse action repeat independent of the frame-rate. 2012-04-15 13:21:12 +01:00
James Turner
086df400de Fix 2.5D panel hit detection, compute logical panel extend from actions. 2012-03-25 18:46:04 +01:00
ThorstenB
92d5620b9f Fix Linux build 2012-03-16 23:21:07 +01:00
James Turner
8c187164fe Work on making 2D panels act like standard scene-graph elements for picking and drawing.
(This includes 2.5D panels in the 3D scene)
2012-03-16 17:22:18 +00:00
Torsten Dreyer
ddb4fa050f Some warning fixes, mostly unused variables 2011-12-25 14:41:47 +01:00
ThorstenB
d47342a5a4 Add --log-class option, improve logging classes.
Replace SG_GENERAL by more specific log classes in many places.
Allow "," to separate logging classes (using "|" is odd on the
command-line).
Also add new option to make logging more useful for developers.
You can use:
  --log-level=debug --log-class=environment
to only get environment debug messages, or
  --log-level=debug --log-class=sound,ai
to only get debug messages related to the sound or AI subsystem.
2011-12-11 14:06:17 +01:00
James Turner
a05ea36acb Restructure GUI code, isolate PLIB in source files, to ease future refactoring and alternative GUI layers. 2011-11-19 20:25:51 +00:00
James Turner
70b4f38ebc Goodbye automake. 2011-11-01 11:15:53 +00:00
James Turner
b1b4b7ecf4 Fix (nearly) all the std:: namespace violations in headers, in preparation for fixing SGsmplstat.hxx to *not* do a 'using namespace std'. 2011-10-17 17:41:59 +01:00
James Turner
6c52a5ac85 Fixes for include-file flattening - condition.hxx no longer pulls in props or props_io 2011-07-30 10:47:28 +01:00
James Turner
7abf7c5748 CMake header support for XCode/Visual Studio 2011-07-19 07:58:03 +01:00
James Turner
a91ec5f9f9 Initial work on CMake build files, with considerable help from Olaf Flebbe. 2010-12-19 15:06:04 +00:00
Christian Schmitt
0a5e86f4e6 remove old .cvsignore files 2010-11-11 01:16:29 +01:00
James Turner
f02267e3e3 Remove a stray include that got missed. 2010-10-29 14:11:54 +01:00