Thomas Geymayer [Sun, 9 Dec 2012 22:08:04 +0000 (23:08 +0100)]
Create new FBO if Canvas render target size chanages
As doesnt seem to work to just resize the texture, if changing
the size of the Canvas render target a new FBO is created and
placed on all active placements.
James Turner [Fri, 7 Dec 2012 20:26:24 +0000 (15:26 -0500)]
Work on making OpenAL a compile-time option.
ENABLE_SOUND=0 now works when configuring SimGear, and libSimGearScene can be linked without OpenAL. However, more testing of FlightGear in this mode is needed before it's officially supported!
Thomas Geymayer [Thu, 6 Dec 2012 22:13:19 +0000 (23:13 +0100)]
Implement Canvas single/double/tripple click handling.
- Implement click event creation like specified in
DOM Level 3:
* Check for max move distance between mousedown/up
and clicks
* Check for click timeout
* Count clicks and report double clicks
Thomas Geymayer [Sun, 2 Dec 2012 12:19:35 +0000 (13:19 +0100)]
First working version of DOM like Canvas event handling
- Now it is possible to attach listeners to canvas
elements and also the canvas itself, which get
called upon different mouse events (Currently
only basic mouse events supported. click/dblclick
etc. are missing)
ThorstenB [Sat, 1 Dec 2012 09:59:57 +0000 (10:59 +0100)]
#946: some libraries not found on Ubuntu/Debian
Ubuntu/Debian introduced "multiarch" library directories, which is
unsupported by CMake <= 2.8.10. Add manual search paths as a workaround.
Currently it is only needed for libsvn, but it is needed for any lib
which is converted to the new directory standard.
James Turner [Sun, 25 Nov 2012 22:36:15 +0000 (22:36 +0000)]
Make SGLockingQueue::pop usable.
Since there's no external lock, it was impossible to check the queue was non-empty before a pop, without a race condition. To avoid this, tolerate an empty queue and return a default constructed value.
ThorstenB [Wed, 21 Nov 2012 19:17:58 +0000 (20:17 +0100)]
Fix compiler error with disabled sound support.
("source" is undefined in SGSampleGroup::stop).
Also fixes two related compiler warnings (unused var "sample").
James Turner [Mon, 19 Nov 2012 15:33:53 +0000 (15:33 +0000)]
Remove duplicate members in SGSampleQueue.
Remove duplicate members shared by SGSoundSample and SGSampleQueue (which inherits from it). Change SGSoundSample to expose some members as protected data for access by the sample-queue, and hence share nearly all the methods. Also remove 'inline' keyword from virtual methods.
James Turner [Sat, 17 Nov 2012 18:08:38 +0000 (18:08 +0000)]
Tweak HTTP handling for POST requests.
Tolerate slightly malformed request URLs (no slash following the host specified), and use a better check when POST-ing to decide the request-body data source.
ThorstenB [Sat, 10 Nov 2012 09:44:19 +0000 (10:44 +0100)]
gz wrapper to write and read "container files".
Packs arbitrary data (strings, property trees, binary blobs, ...) into a
single file.
Use this for storing/loading user-data only, not for distribution files
(scenery, aircraft etc).
ThorstenB [Sat, 10 Nov 2012 09:12:01 +0000 (10:12 +0100)]
Proper fix for gzfilebuf choking on some files.
When reading a new block of data, and the first byte of the new block is
0xff (_signed_ char -1), then this must be converted to _integer_ 0xff
(+255), not -1 - which would indicate an error condition (EOF==-1). All
valid _data_ character must be returned as non-negative, see
streambuf::underflow spec, or compare with
http://www.opensource.apple.com/source/zlib/zlib-12/zlib/contrib/iostream/zfstream.cpp
or
http://www.raspberryginger.com/jbailey/minix/html/zfstream_8cpp-source.html
ThorstenB [Fri, 9 Nov 2012 21:02:34 +0000 (22:02 +0100)]
gzfilebuf choked when reading large, heavily compressed files.
Apparently a 4K buf isn't enough. 64K seem much better ;-).
Real solution may be an adaptive buffer size in gzfilebuf.
James Turner [Wed, 7 Nov 2012 21:10:00 +0000 (21:10 +0000)]
Test for, and fix, materials handling in BTG code.
It's possible (and happens!) to have less than 2^16 vertices or tex-coords, but more than 2^15 objects (tris) with the same materials. This was breaking our version 7 vs version 10 detection logic. Pete found the issue, I'm simply committing a version of his fix.
ThorstenB [Tue, 6 Nov 2012 23:53:32 +0000 (00:53 +0100)]
Fix property find_last_child/addChild.
Initial "addChild" should have index #0 (not #1).
Also extend test cases.
(Test case shows addChild(append=false) isn't working as expected!?)
Thomas Geymayer [Mon, 5 Nov 2012 16:58:24 +0000 (17:58 +0100)]
Move parseColor to scene/util
parseColor is used to parse a CSS color string into an osg::Vec4
which is only available in SimGearScene. If someone needs the
function also in SimGear headless mode we have to think about
where to better place this function.