Commit Graph

4573 Commits

Author SHA1 Message Date
Torsten Dreyer
543f1b7902 Set sun color below horizon
Thorsten Renk:
The following patch sets the sun color to alpha=0 when
the sun is below the local horizon, removing the oddity
that the sun is seen 'through' the terrain when the terrain
at large distance is rendered by the skydome.
2014-10-08 12:45:01 +02:00
Stuart Buchanan
93a63a0678 Further work to clean up UniformCache for Effects 2014-09-27 22:05:30 +01:00
Torsten Dreyer
2bf79a2fa1 Merge branch 'UniformFactory' into next
Merging in Stuart's fix for the Effect system
2014-09-27 21:50:44 +02:00
Torsten Dreyer
ab956f15c3 A better fix for crash in the Effect System
Stuart has improved the UniformCache approach, here are his
changes:
- We have a UniformCache so that each unique Uniform is only created once
- As part of the UniformFactory we also have a queue of listeners that are still to be added
- When the main thread sends an Update node visitor across the Effects,
  all queued listeners are de-queued and added.
2014-09-27 21:48:36 +02:00
Thomas Geymayer
deceee8997 Fix compiler warnings. 2014-09-22 18:24:13 +02:00
Thomas Geymayer
b3c7d63809 Let ENABLE_TESTS enable/disable also the new Boost.Tests. 2014-09-22 18:21:52 +02:00
Clément de l'Hamaide
2026c665b2 Improve the <usage> tag feature
Do not load the <model> if <usage> tag is found as child.
Instead the load is triggered later by FlightGear
2014-09-21 22:05:45 +02:00
Thomas Geymayer
36fd005bb9 cppbind: check if ghost is of wrong type.
- Throw an exception if converting an object
   from Nasal fails due to a wrong type (nil
   does not throw).
 - Update cppbind test cases accordingly (and
   refactor another test suite to use Boost.
   Test).
2014-09-15 23:42:12 +02:00
Torsten Dreyer
46bed67cce first stab at UniformFactory 2014-09-05 11:28:58 +02:00
Torsten Dreyer
5b9af0c0aa Revert "Partial fix for crash in SGPropertyNode::fireValueChanged"
This reverts commit f33ad357e9.
2014-09-05 11:28:28 +02:00
Thomas Geymayer
85090180d0 canvas::Text: fix global StateSet and line start cursor pos with empty line. 2014-08-31 19:24:58 +02:00
Torsten Dreyer
f33ad357e9 Partial fix for crash in SGPropertyNode::fireValueChanged
The effect system used Listeners on property nodes to get the values
for shader uniforms. These listeners get deleted by an osg thread
causing access to freed memory when this happens while the main thread
calls fireValueChanged.

This patch changes the update method to polling for scalar properties.
This isn't 100% threadsafe, too. But at least it does not crash anymore.
2014-08-29 15:30:25 +02:00
Clément de l'Hamaide
c30ce67e16 Remove Textures.high logic 2014-08-27 22:08:20 +02:00
Torsten Dreyer
3ca7369fb2 Canvas: add stroke-linejoin handling for path elements 2014-08-26 00:08:35 +02:00
Thomas Geymayer
088ce31f7c canvas::KeyboardEvent: C0/C1 control characters are not printable. 2014-08-25 21:49:44 +02:00
Thomas Geymayer
4f94c22241 Canvas: add method clearFocusElement. 2014-08-25 21:49:21 +02:00
Thomas Geymayer
e1791b3006 canvas::Text: clean up and expose character/cursor positions. 2014-08-23 15:54:07 +02:00
Stuart Buchanan
e608ed5a01 Use surface-lights effect for random tile lights. 2014-08-10 20:20:42 +01:00
Thomas Geymayer
35ebb16215 Canvas: prepare for keypress events. 2014-08-10 19:39:18 +02:00
Thomas Geymayer
68d0891665 Canvas: fix element mouse hit detection with OSG 3.3.2. 2014-08-10 15:37:43 +02:00
Stuart Buchanan
b11ff19a0f Fix VS2010 lack of fminf 2014-08-10 12:54:58 +01:00
Stuart Buchanan
e7e616e07c New materials.xml format 2014-08-09 20:34:08 +01:00
bcoconni
14f2f9e917 Added some OSG headers for the correct evaluation of the OSG_VERSION_LESS_THAN macro. 2014-08-09 19:53:19 +02:00
Thomas Geymayer
791273c61d Update for OpenSceneGraph 3.3.2 API changes. 2014-08-09 18:13:45 +02:00
Thomas Geymayer
519326f751 Add simple keyboard event demo application. 2014-08-08 00:59:06 +02:00
Thomas Geymayer
d1f5d92a7b Move canvas::AlignmentFlag to separate file.
Mapping in a separate file allows easier exposing of
values and string representation to Nasal.
2014-08-03 16:39:26 +02:00
Christian Schmitt
f448898531 Fix lights appearing three times.
The 3 lights showing up are fixed by my patch. It's the old way of
calculating a normal (PLIB-style) that makes them show up.
2014-08-03 13:13:59 +02:00
Thomas Geymayer
d9b66fc0ef canvas::Layout: support for alignment.
Set alignment inside layouts, taking care of where
excess space is distributed.
2014-08-03 12:02:39 +02:00
Thomas Geymayer
3bcd0bafd5 Lots of (mostly) doxygen fixes/cleanup. 2014-08-01 00:13:25 +02:00
Thomas Geymayer
942181c8ae Canvas: Support for preventDefault() on Events. 2014-07-30 17:16:26 +02:00
Thomas Geymayer
7df39b9fc8 Fallback for old Boost (also with UTF8-CPP library). 2014-07-30 12:44:21 +02:00
Thomas Geymayer
f41b18f064 Improve (mostly Canvas event related) documentation. 2014-07-29 23:57:59 +02:00
Thomas Geymayer
c5d649aa0b Canvas: basic Keyboard event support (with input focus). 2014-07-29 22:22:20 +02:00
Thomas Geymayer
64ac22f50c Canvas: warn for missing tff and png plugins. 2014-07-27 12:11:09 +02:00
Thomas Geymayer
719ee36f5c Canvas: backdrop/stroke option for text (based on Gijs patch). 2014-07-27 11:05:49 +02:00
Thomas Geymayer
92851135d4 Doxygen: disable (not working) latex output and update version. 2014-07-22 12:51:01 +02:00
Thomas Geymayer
76fc47b24b canvas::Layout: support for contents margins. 2014-07-22 12:00:24 +02:00
Thomas Geymayer
f25abad9d7 Move overflow protected add helpers to math. 2014-07-22 11:45:28 +02:00
Thomas Geymayer
23413b4781 canvas::Layout: clear parent/canvas after calling onRemove. 2014-07-21 23:56:41 +02:00
Thomas Geymayer
e036dfc5bf Hopefully final fix for old gcc... 2014-07-21 13:26:09 +02:00
Thomas Geymayer
9260bea850 One more fix for old gcc. 2014-07-21 12:22:33 +02:00
Thomas Geymayer
c1f09034e0 Trying to make old gcc on Jenkins happy. 2014-07-21 10:54:31 +02:00
Thomas Geymayer
557e4f75b5 canvas::Layout: support for hiding items. 2014-07-21 00:25:59 +02:00
Thomas Geymayer
e71d6b24d7 cppbind: helper to call Nasal methods on NasalWidget. 2014-07-21 00:22:15 +02:00
Thomas Geymayer
726a4c6d10 canvas::NasalWidget: check for empty setGeometry callback. 2014-07-20 23:31:32 +02:00
Thomas Geymayer
6af8d32078 cppbind: fix Ghost casting/storage in polymorphic class hierarchies. 2014-07-20 23:17:33 +02:00
Thomas Geymayer
f6b16e2ba8 canvas::Element: floating point scissor coordinates.
GL_SCISSOR itself only supports integer coordinates, but
with reference frames different from GLOBAL transforms
influence the position of the clipping frame, possibly
resulting in wrong positions due to too low precision.
2014-07-19 20:52:17 +02:00
Thomas Geymayer
e415b08da4 canvas::BoxLayout: fix parent ref on add/remove. 2014-07-17 15:10:35 +02:00
Torsten Dreyer
1d93e8d61e New Version: 3.3.0 2014-07-17 14:54:35 +02:00
Torsten Dreyer
4bd34991e9 New Version: 3.2.0 2014-07-16 14:56:49 +02:00