Thomas Geymayer [Sun, 3 Mar 2013 18:26:25 +0000 (19:26 +0100)]
cppbind: rework to allow binding nearly everything.
It is now possible to register all types of member function
and free functions as methods for nasal::Ghost objects.
The return value and arguments are converte automatically
to the required types.
Also usage is simplified by removing replacing the old
method and method_func with a single method function
which only needs a name for the method and something
callable.
James Turner [Sun, 3 Mar 2013 16:06:51 +0000 (16:06 +0000)]
Look for MSVC 3rdparty deps differently.
Check for the 3rdparty dir in the parent of build dir, not the parent of the source dir. For the recommended build layout, this is the same location, but for super-builds using fgmeta it's not (and the source tree should not be touched).
If this causes anyone issues, please let me know, since it's possible more flexibility is needed to set the path explicitly.
Thomas Geymayer [Fri, 1 Mar 2013 23:13:06 +0000 (00:13 +0100)]
cppbind: Prepare for improved bindings.
- Improved Nasal/C++ bindings will follow. For now just test if
all compilers are happy with intended approach.
- Add to_nasal overload for std::map<std::string, T>.
Thomas Geymayer [Fri, 1 Mar 2013 11:22:51 +0000 (12:22 +0100)]
Add optional user_data to Nasal C functions.
A user_data pointer and another pointer to an optional
deleter function is stored in unused parts of the naPtr
union. The previous behavior of extension functions does
not change. Only one additional boolean comparison is
required upon each function call to check whether user
data is available.
The levels at which page nodes are built is exposed by an
osg database pager option SimGear::SPT_PAGE_LEVELS which could
contain a blank separated list of levels where paging occurs.
Also the database pagers paths are searched for static lower
level of detail tiles in case they are available.
This defers loading the models into a paged lod node
that is evaluated at a later point in time. That should
help for memory problems with higher visibilities.
James Turner [Wed, 13 Feb 2013 13:32:19 +0000 (13:32 +0000)]
Initial work on package management.
Basic library infrastructure, catalog download/refresh, and package install,
uninstall and update. Disabled at cmake time by default, and not yet hooked
into FlightGear.
James Turner [Sat, 9 Feb 2013 12:40:44 +0000 (12:40 +0000)]
Command-manager supports functors.
Will be used to support native Nasal commands, which was tricky with pure function pointers before. Can also be used to avoid some trampoline functions in the code, but this can happen gradually.
Thomas Geymayer [Sat, 9 Feb 2013 11:09:43 +0000 (12:09 +0100)]
Fix CanvasText horizontal alignment.
Don't reduce width of bounding box below character width
even if outline of rendered character is smaller. This
prevents trailing spaces from being ignored and also
fixes continuously chaging alignment (especially with
monospace fonts).
James Turner [Tue, 5 Feb 2013 22:49:25 +0000 (23:49 +0100)]
Rewrite logging code.
Support multiple backends, and make it thread-safe. Use an internal thread to push log entries to backends, to avoid blocking the submitting thread for any time.
Thomas Geymayer [Thu, 7 Feb 2013 00:22:09 +0000 (01:22 +0100)]
Fix PropertyObject bug and interface improvements.
- Fix overwriting of parent node if PropertyObject::node() is
called for a non-existing node.
- Prevent implicit conversion from const char* and
SGPropertyNode*
James Turner [Sun, 3 Feb 2013 17:11:05 +0000 (17:11 +0000)]
Add 'release' bindings to knob animation.
Currently this fires on button release, but also after any mouse-wheel movement (since they are sent as buttons). This feels slightly wrong, but can't decide how a spring-loaded know would work, when interacting via the mouse-wheel. Comments welcome.
James Turner [Sun, 3 Feb 2013 16:33:30 +0000 (16:33 +0000)]
Knob animation: shifted mode binding.
As part of this, pass the osgGA GUIEventAdapter down into the pick callbacks, which seems reasonable to me. If anyone can foresee issues with this, please let me know and I can adjust the API.
Thomas Geymayer [Wed, 23 Jan 2013 00:09:57 +0000 (01:09 +0100)]
Nasal String wrapper and allow adding methods to string objects.
- Add nasal::String for wrapping Nasal string data and accessing
string methods (which eg. could be exposed to Nasal)
- Allow adding functions from C/C++ which are callable on
Nasal strings.
bucket: Make no bucket cross the 0 and 180 deg longitude border.
Change the bucket tiling at the poles not to cross the
0deg longitude and not to cross the 180deg longitude line.
This lets some special cases disappear for the buckets as well
as for the hierarchical level of detail spt loader.
Also change the last degree tiles from spanning 360 degrees to
12 degrees. Before we had 8 nested rings which neither helps
scenery paging nor culling. With that change the chunks are
about the same order of size than any other tile. Also the
tile shapes are much more friendly for culling and paging.
Also in presence of the current scenery, this polar tiles contain
as of today just totally broken geometry which tells me that
also the scenery generation process did not like these rings
for the tile shapes.
The impact on the current scenery is low. With this change the
polar regions do no longer load the tiles that are available
in the current scenery builds. The last degree tiles are broken
in this scenery version anyway. The next degree that is changed
will really loose some tiles that were sensible as of today.
All these areas are replaced with sea tiles by the old paging
structure. So, you will have at least ground below you when you
fly there. A hopefully comming soon scenery rebuild will
use this new tiling structure and thus will be the first one
providing closed polar caps.