This will allow an object to be moved using a line (with 2d points).
Use the factor to switch direction (direction will depend on the order of definition of the end points of the vertex and) together with a (usually normalised property to define how much of the translation to apply).
<animation>
<type>translate</type>
<object-name>mm_radios-display</object-name>
<property>/sim/model/f-14/radio-position-norm</property>
<factor>-1</factor>
<axis>
<object-name>mm_radios-display-alt-position-axis</object-name>
</axis>
</animation>
On VR with visibility masking the depth buffer is first set to the
nearest possible value in parts of the frame that won't be visible
through the VR headset's lenses. This is meant to reduce GPU fragment
load.
The sky dome however is rendered with depth testing disabled which
bypasses the visibility masking. To allow invisible parts of the sky
dome to be culled, enable depth testing but set the depth mask to false
to prevent modification of the depth buffer.
Previously the STG Loader had a class member keeping track
of each WS30 tile that had been loaded, to ensure the terrain
was only loaded once.
However, this was a class member on a loader, and we have multiple
OSG loading threads. So the WS30 terrain was loaded ~6 times.
Change to a static, protected with a mutex so we only load the tile
once.
50% improvement in fps from the reduction in vertices, and an
improvement in loading.
simgear/scene/model/animation.*: added TransformExpression() - returns SGExpressiond
if given a SGRotAnimTransform or SGTranslateTransform.
simgear/scene/model/SGTranslateTransform.hxx:SGTranslateTransform: added copy
of SGExpressiond for use by TransformExpression().
Add LEFT_BIT and RIGHT_BIT node masks, which are only shown on the left
or right viewports. These will be used for eye specific visibility masks
with VR.
To allow for custom compositors and passes created by C++ code alongside
those created by Compositor::create(), add a resetOrderOffset() function
which resets _order_offset back to zero. This will allow FlightGear to
prevent repeated compositor reloads from increasing _order_offset
indefinitely, which soon results in render orders beyond those set
statically for the GUI and upcoming VR mirror compositors.
The Canvas camera and texture get recreated in several circumstances.
Calling .release() on a ref_ptr will just return the raw pointer and
'delete' won't be called. The proper way to explicitly delete an object
managed by a ref_ptr is to set the ref_ptr to NULL. This will delete it
as long as it's not referenced by any other ref_ptr.
If we have an uncallable object error, also show the type and value of the
uncallable object.
To make this work, have upgraded simgear/nasal/lib.c:dosprintf() to be globally
available. Could perhaps rename it and declare in a different header. But it's
C so we don't want to make it part of simgear's general utility functions.
These formats are not defined by OSG, so we manually define them. Some GPUs might not support them as we are using a GL compatibility context, but it shouldn't matter for now as they are only being used by the HDR pipeline.
Previously on my system, generating vegetation for a given tile
took 0.15-0.2s (for ~ 56k positions), of ~0.4s. While this is done in a
separate loading thread, the sheer number of tiles being loaded
caused noticeable delays and popping of higher LoD tiles.
As a tile at the highest LoD is typically 6x6km, and vegetation
is generated on a scanline of individual triangles, there is a _lot_
of temporal locality on the landclass of a series of points.
By caching the material information required from the landclass lookup
we can avoid a whole much of material lookups for each successive
vegetation point.
On my system this reduced the time to generate vegetation down to
0.02s per tile, and total tile generation time down to ~0.2s.