Tim Moore
59fc902cfb
don't render an EffectGeode if there is no valid technique
...
Normal geometry has a default effect; geometry with no default effect
is unlikely to look correct with no state set applied. This fixes the
problem of clouds being displayed as multi-colored rectangles when
shader effects are turned off.
2009-12-14 06:52:00 +01:00
Tim Moore
e37c218c2a
take locks out of ModelRegistry
...
They should be unnecessary and were causing deadlock with Effects that
load images.
2009-11-29 22:54:02 +01:00
Tim Moore
c2317edf8a
Revert boost requirement to 1.37
...
I don't want to get into testing for tr1::unordered_map, and the
boost compatibility doesn't exist in 1.34.
2009-11-29 12:42:10 +01:00
Tim Moore
cb7ac404d9
Merge branch 'ehofman/sky'
2009-11-26 23:28:34 +01:00
Tim Moore
5abc6c995f
fix a memory leak in newcloud.cxx
2009-11-26 16:30:46 +01:00
Tim Moore
ddd72b2b37
Use an effect for 3d clouds
2009-11-26 11:40:41 +01:00
Tim Moore
7f5df1fb66
Support for shader program attributes in effects
...
Also, use a hash table for the effect shader program cache.
2009-11-26 11:39:34 +01:00
Tim Moore
2e71b64de1
Better error reporting for effects
...
Throw an exception when an undefine attribute value is found in an effect.
Also, fix a typo in TexEnvCombine operand attributes.
2009-11-26 11:32:00 +01:00
Tim Moore
45f1f9263f
add a property debugging function
2009-11-26 10:38:31 +01:00
Tim Moore
b8a6d1ac4d
add depth attribute to Effect
2009-11-23 09:15:47 +01:00
Tim Moore
40533f50df
Drop required Boost version from 1.37 to 1.34
...
Use boost/tr1 to bring in std::tr1::unordered_map instead of the Boost
version.
2009-11-22 23:05:11 +01:00
Tim Moore
539ced191b
Move tree shaders to an effect
...
Also, improve effect hash keys.
2009-11-22 00:32:51 +01:00
Tim Moore
1a400b890b
Effect file support for GL_VERTEX_PROGRAM_TWO_SIDE and POINT_SIZE
2009-11-22 00:27:53 +01:00
Tim Moore
ebe5a5579c
shader language predicate
2009-11-20 22:59:15 +01:00
Tim Moore
3cd5322496
descend into Effects to find default material animation values
2009-11-16 22:43:41 +01:00
Tim Moore
cadecdcab7
add a transparent texture for effects
...
This is used as a default texture for the chrome animation.
Also, fix a typo in creating combiners.
2009-11-16 22:42:46 +01:00
Tim Moore
cd4030b7db
Make MultiChangeListener derive publicly from SGPropertyChangeListener
...
Otherwise it doesn't work as a listener!
2009-11-16 22:39:56 +01:00
Tim Moore
0a2264cad4
When instantiating effects, copy user data of any created nodes.
...
This bug was the cause of the huge memory consumption / death reported at some places:
the BVH data on "raw" .ac models (random objects) was dropped on the floor.
2009-11-15 23:51:08 +01:00
Tim Moore
bb2a02daa8
Bump boost version to 1.37
2009-11-15 01:17:34 +01:00
Tim Moore
5991195062
optimize creation and sharing of effects
...
Implement equality test and hash for for property trees. In an
Effect, make a hash table of Effects that inherit from it keyed on
their unmerged property tree. Using that, makeEffect() should return a
single Effect for given property tree description. Animations may
change that in the future...
2009-11-13 22:41:11 +01:00
Tim Moore
54c4055af3
Effects in models working for transparent materials and chrome animation
...
Implementation of animated effect values via the property system.
Add names for TexEnvCombine attributes
2009-11-13 22:41:11 +01:00
Tim Moore
cb07210bc7
Move Texture unit builder into TexBuilder.cxx
...
Do the refactoring necessary to make that work.
2009-11-13 22:41:11 +01:00
Tim Moore
3e40d624a8
Effects for models
...
Basically working, at last. Among other things, create effects in
models loaded directly from .ac files; this can happen, for example,
with the random models from the materials library.
2009-11-13 22:41:11 +01:00
Tim Moore
63ce675914
Splicing visitor for rewriting scene graphs with a minimum of copying
2009-11-13 22:41:11 +01:00
Tim Moore
14e5e87a4d
Dump texture attributes of StateSet into effect property tree
...
Also, decode blend function.
2009-11-13 22:41:11 +01:00
Tim Moore
e7e81c6639
getStateAttribute utility function
...
This provides a concise, typesafe way to get attributes from osg::StateSet.
Also, blew away BackRefInserter.
2009-11-13 22:41:11 +01:00
Tim Moore
23d0601d82
Add support for blend functions and alpha test functions in effects
2009-11-13 22:41:11 +01:00
Tim Moore
6db9138eeb
wip for effects in models
...
multi-index for effect attributes
2009-11-13 22:41:10 +01:00
Tim Moore
6a7c200002
remove CopyPolicy from ModelRegistry
...
Put the responsibility for copying a loaded model directly in
SGReaderWriterXML.
2009-11-13 22:41:10 +01:00
Tim Moore
a25e859fa7
fix typo
2009-11-10 22:10:57 +01:00
Tim Moore
4e2eb2f24c
Move propertyExpression code from flightgear to simgear
...
Also add a function (possibly redundant) to access the global property
root.
2009-11-09 15:53:10 +01:00
Tim Moore
e2ce4c0fa9
More include SGMath.hxx to keep MSVC happy
2009-10-26 18:37:27 +01:00
Tim Moore
b1c49045a8
forward declare Point3D in sg_types.hxx
...
This avoids sucking in SGMath.hxx -- and therefore a bunch of OSG headers --
into many compilation units.
2009-10-18 12:11:13 +02:00
Tim Moore
40e13b91fe
Merge branches 'toresten/geofix', 'jmt/lcase', 'stuart/clouds' and 'jmt/dump'
2009-10-12 10:03:00 +02:00
Tim Moore
64756d14d0
Back out convertToLowerCase function
...
It brought in an OSG dependency; we'll just use boost::to_lower_copy instead.
2009-10-01 00:31:36 +02:00
Tim Moore
bac2ef601d
Merge branch 'jmt/lcase' into next
2009-09-28 23:51:07 +02:00
Tim Moore
cf3bab89f9
Merge branch 'master' into next
2009-09-28 23:50:56 +02:00
Tim Moore
ecd0a53412
Add writeLocalData functions for internal scenegraph classes
...
This makes the scenegraph dump more complete and therefore more useful.
2009-09-22 12:56:28 +02:00
Tim Moore
3456434e37
check for null effect in EffectCullVisitor
...
An EffectGeode might not have any effect.
2009-09-18 15:43:46 +02:00
Tim Moore
454c5b1ed2
Merge branch 'tat/configure' into next
2009-09-17 12:25:19 +02:00
Tim Moore
819d3f5ded
Merge branch 'topic/projection' into next
2009-09-17 12:22:06 +02:00
Tim Moore
9cbbe55598
Merge branch 'frohlich/weak' into next
2009-09-17 12:18:33 +02:00
Tim Moore
59ef7d8fd1
Create a singleton for the parser table
2009-07-19 23:05:04 +02:00
Tim Moore
1f308c9ec3
Move definition of SGRawBase<...>::printOn out of simgear namespace
...
They are declared in the global namespace, and MSVC insists that they be
defined there.
2009-07-19 22:39:16 +02:00
Tim Moore
4943d3aa53
Add missing return statements
2009-07-18 10:12:59 +02:00
Tim Moore
828d561113
Store material data with Effect
...
Somehow this got left out, which broke ground intersection queries.
2009-07-17 16:18:12 +02:00
Tim Moore
fc7ec4299e
include file change to make simgear work with OSG 2.9.X again
2009-07-16 23:09:10 +02:00
Tim Moore
b633b8d0d3
change MAX_PATH to max_path to avoid Windows compilation problems
2009-06-17 11:37:21 +02:00
Tim Moore
76948416a9
overhaul sg_throwable to behave like a proper exception
...
Make sg_throwable inherit from std::exception.
change exception objects to contain C strings: exception objects should not
include objects, like std::string, whose copy constructor could throw.
2009-06-16 11:11:13 +02:00
Tim Moore
7e7ce2f38e
Merge branch 'maint' into next
2009-05-18 00:34:06 +02:00
Tim Moore
006f90997a
Merge branch 'maint' into next
2009-03-31 00:04:30 +02:00
Tim Moore
342de209a2
Merge branch 'topic/nasal' into next
2009-02-16 00:48:00 +01:00
Tim Moore
ff7e70f4d5
Merge branch 'topic/gcintersect' into next
2009-02-13 10:07:15 +01:00
Tim Moore
950f51909c
New getPrimitive function.
...
This searches for the primitive found in an OSG intersection query.
2009-02-13 09:40:05 +01:00
Tim Moore
f86e6d344c
Make SGSubsystemGroup::Member copy constructor private.
...
The copy constructor wouldn't make any sense and would confuse ownership of
the subsystem pointer. Problem noted by John Denker.
2009-02-07 00:37:47 +01:00
Tim Moore
08581282dd
Merge branch 'topic/cloudz' into next
2009-02-06 19:16:19 +01:00
Tim Moore
e1e47e76ec
Turn off z buffer writes for clouds.
...
This is standard practice for semi-transparent objects and should cut down
on the flickering and other sorting artifacts.
2009-02-06 17:48:23 +01:00
Tim Moore
22c7df5936
Merge branch 'maint' into next
2009-02-04 11:03:20 +01:00
Tim Moore
81a44d1340
Merge branch 'releng/1.9.1' into maint
2009-02-04 11:02:30 +01:00
Tim Moore
589dae7b0c
Build trees under a transform note that is rotated to Z-up.
...
This allows the tree geometry to be shared across the entire scene because it
doesn't need to be rotated for each scenery tile.
2009-01-30 11:18:08 +01:00
Tim Moore
3ff13189aa
Don't expand all the trees into display lists.
...
This can chew up large amounts of memory for questionable gains. We do
let the tree model geometry be in a display list if OSG chooses to put
it there.
Various renaming and cleanup. Save some memory by reverting
ShaderGeometry's base class back to osg::Drawable.
2009-01-30 11:17:02 +01:00
Tim Moore
7151c3fac1
Merge branch 'topic/yontree' into next
2009-01-28 07:53:38 +01:00
Tim Moore
3e023b77dd
Merge branch 'maint' into next
2009-01-28 07:53:31 +01:00
Tim Moore
31d9eaf54c
Use osg::Geometry code to draw trees ourselves.
...
This reverts back in the direction of Yon's original patch: the model is
drawn within ShaderGeometry::drawImplementation. This saves a lot of memory
over the previous approach of creating a PrimitiveSet for each model.
2009-01-28 07:43:09 +01:00
Tim Moore
781c445d14
Merge branch 'topic/modelopt' into next
2009-01-23 23:27:48 +01:00
Tim Moore
26a416399f
Merge branch 'topic/yontree' into next
2009-01-23 23:27:37 +01:00
Tim Moore
f7dc7f039e
QuadTreeBuilder: create leaves on demand
...
This avoids lots of empty leaves.
2009-01-23 19:30:29 +01:00
Tim Moore
3c74fea087
Rewrite ShaderGeometry to use display lists and OSG primitives.
...
Based on a patch from Yon Uriarte.
Eliminate _trees list from ShaderGeometry
Use the position and scale values that are already available.
2009-01-23 19:29:18 +01:00
Tim Moore
be0635bfd3
Optimize empty groups from .ac models
...
The OSG optimizer seems to have changed since this work was originally done.
2009-01-23 16:11:23 +01:00
Tim Moore
6723ef95c2
Merge branch 'maint' into next
2009-01-19 00:13:07 +01:00
Tim Moore
1a8fd62680
Protect against division by zero in QuadTreeBuilder
...
This could only happen when there's one leaf in the tree, or all the objects
happen to have the same position. Noticed by Csaba Halaz
2009-01-19 00:04:59 +01:00
Tim Moore
8b57ed46b1
Sort cloud sprites using std::sort, based on projected Z.
...
A "cleanup" of cloud sorting.
2009-01-16 00:37:40 +01:00
Tim Moore
25c08e56c2
Merge branch 'foo' into next
2009-01-15 22:52:11 +01:00
Tim Moore
a47d5536fa
Merge branch 'maint' into next
2009-01-14 22:34:20 +01:00
Tim Moore
db8f7f21e8
Remove OptionsPusher and manipulation of osgDB dataFilePathList.
...
The bug it worked around has been fixed in the OSG ac3d loader, and changing
the path list has unpleasant multithreading implications.
2009-01-14 22:13:12 +01:00
Tim Moore
3c312c55f1
Merge branch 'maint' into next
2009-01-14 12:13:44 +01:00
Tim Moore
2d11419cba
SGPropertyNode must increment / decrement the reference counter in an aliased
...
node.
From Csaba Halász.
2009-01-14 12:10:23 +01:00
Tim Moore
07a4508944
Merge branch 'topic/mat-anim' into next
2009-01-13 22:58:45 +01:00
Tim Moore
62913739bb
Merge branch 'maint' into next
2009-01-13 22:52:19 +01:00
Tim Moore
55e9d8d944
SGMaterialAnimation: Don't install an update callback if values are static
2009-01-13 15:35:15 +01:00
Tim Moore
a9439d58c7
SGMaterialAnimation: factor out update of osg::Material
2009-01-13 13:15:34 +01:00
Tim Moore
62864637a3
Merge branch 'maint' into next
2009-01-12 13:14:31 +01:00
Tim Moore
778c3ab25c
Moved everything from Lib to simgear
2009-09-16 08:06:28 +02:00