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.
Thomas Geymayer [Mon, 15 Sep 2014 21:42:12 +0000 (23:42 +0200)]
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).
Torsten Dreyer [Fri, 29 Aug 2014 13:30:25 +0000 (15:30 +0200)]
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.
Thomas Geymayer [Sat, 19 Jul 2014 18:52:17 +0000 (20:52 +0200)]
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.
Thomas Geymayer [Mon, 14 Jul 2014 16:51:11 +0000 (18:51 +0200)]
Nasal: require 0o as prefix for octal numbers.
Using just 0 as prefix for octal number can lead to confusion
where numbers could be interpreted the wrong way (oct instead of
dec).
Lets follow the same convention as Python 3 and Ecma 262 level 6
and use '0o' as prefix which can not be confused inadvertently.
Thomas Geymayer [Fri, 11 Jul 2014 17:07:53 +0000 (19:07 +0200)]
Don't restore old canvasses on reset.
No need for this anymore as PRESERVE now works as expected.
Otherwise old canvasses are restored and do not work anymore
as the placements of the new canvasses do not apply.
Thomas Geymayer [Mon, 30 Jun 2014 16:22:24 +0000 (18:22 +0200)]
HTTPRequest/pkg::Install: do not replace callbacks.
Keep a list of callbacks to allow registering multiple callbacks
to the same event. This is consistent with eg. jQuery.Deferred
and is needed for example to open multiple dialogs showing the
progress of installing a package at the same time.
Thomas Geymayer [Thu, 26 Jun 2014 07:44:36 +0000 (09:44 +0200)]
Nasal: fix parsing octal/hex numbers in strings as well as during lexing.
Parse the same number formats (octal, dec, hex) in literals and tokens. Was
previously quite a mess, and is still not the best solution, as lexing and
string parsing uses different implementations, although they are meant to
do exactly the same conversions.
Thomas Geymayer [Sun, 22 Jun 2014 22:27:41 +0000 (00:27 +0200)]
nasal::Ghost: improve intrusive pointer storage and weak references.
- Just increment/decrement reference count for intrusive
smart pointers. No need to create an additional object
on the heap.
- Keep strong reference for weak pointer based ghosts
to prevent destroying objects while beeing used.
Thomas Geymayer [Fri, 13 Jun 2014 17:12:56 +0000 (19:12 +0200)]
Simple Markdown parser.
Parse just a tiny subset of Markdown, to basically collapse
multiple whitespace and do paragraphs only after two newlines.
Also one-level, unordered lists are supported. The output can
be eg. directly forwarded to canvas::Text.
Rebecca Palmer [Tue, 10 Jun 2014 18:30:09 +0000 (19:30 +0100)]
utf8ToLatin1: return original instead of crashing on non-UTF-8 input
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750859
(In the long run we should probably fix the underlying
inconsistent-text-encodings problem, but probably not in time for 3.2)