Commit Graph

1925 Commits

Author SHA1 Message Date
timoore
8f46f2cac8 Rewrite livery texture replacement to copy StateSet objects
Also, add a NodeAndDrawableVisitor that descends into osg::Drawable.

That motivation for this is that it's a bad idea to modify state sets
that the osgDB::SharedStateManager might be keeping.
2008-04-23 18:13:50 +00:00
mfranz
8f48515b80 Till BUSCH:
this is a small (-1/+3) patch to fix pick animations on scenery objects.
since picking apparently doesn't care for polygon offsets, the objects
got into the picklist in the wrong way. now, no matter if the "highlight
group" or the "normal group" gets hit first, the callback will fire.
2008-04-23 12:28:45 +00:00
timoore
c7dab4abea rewrite of sky dome code
Add more points to the dome, giving it a dome shape rather than a
dunce cap shape.

Represent as OpenGL DrawElements instead of as triangle strips.

Only calculate have the sky colors and reflect those across the dome.
2008-04-14 21:44:21 +00:00
fredb
5e4c4725bc Update MSVC 7.1 projects 2008-04-14 06:27:26 +00:00
timoore
9861d74221 Fixes for compiling with gcc 4.3
Include standard header files and qualify with std:: where needed.

Add "const" to various char parameters and variables.
2008-04-13 21:11:44 +00:00
fredb
bb3b606820 Allows to load submodels with path relative to current model path.
Submodel path must be prefixed by ./ otherwise path is relative to fg_root ( current behavior )
2008-04-02 22:25:12 +00:00
timoore
09fb51189e Change the tile light group node mask to traverse VASI lights too.
The change to set the light group node mask to LIGHTS_BITS caused
VASI/PAPI lights to not be displayed during the day. This patch fixes
that and optimizes VASI creation a bit.
2008-03-24 21:41:30 +00:00
fredb
bd19899bbc Update MSVC 7.1 projects 2008-03-22 11:39:01 +00:00
fredb
b69753fb76 Win32 fix 2008-03-22 11:38:50 +00:00
timoore
9dc1b5f6f5 model paging patch from Till Busch
Comments from Till:
I started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.

currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there

2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.

3. simplify mode-loading functions (avoid passing around fg_root)

4. avoid supurious MatrixTransform nodes in loaded models

5. fix some memory leaks
2008-03-22 09:30:26 +00:00
mfranz
55c1ac36e3 - warnings--
- make one-shot sounds subject to volume and pitch control (To get
  constant volume/pitch during the whole lifetime, just *configure*
  the sound that way.)
2008-03-20 17:20:54 +00:00
timoore
c12e6cdc09 rationalize node masks a bit 2008-03-17 08:46:23 +00:00
curt
85562e8b95 argh, missed 1.8.4 in one spot. 2008-03-15 16:33:49 +00:00
curt
fd34cc0b87 Simgear also enforces plib-1.8.5 in order to build. 2008-03-15 16:32:36 +00:00
timoore
6322393782 From Till Busch: use install -p if possible 2008-03-11 13:44:43 +00:00
fredb
1f9e954610 Update MSVC 7.1 projects 2008-03-09 22:09:52 +00:00
mfranz
6491746809 use new arrow shortcuts for compatibility reasons (will be removed later) 2008-03-04 11:48:51 +00:00
timoore
6d2f1ff81e cleanup of precipitation contribution
Reindent everything to Stroustrup style and make member variable style
consistent.

Remove unused header files.

SGPrecipitation is now a subclass of osg::Referenced.

Initialize snow and ice intensity to 0 directly. The methods that set
the intensities change the value slowly and so don't work when the
initial value is garbage.
2008-03-04 08:58:33 +00:00
timoore
c724e5fb20 precipitation effects from Nicolas Vivien 2008-03-04 08:54:00 +00:00
timoore
600726976c Add methods to SGGeod to return OSG Matrix objects for local frames.
Methods have been added for Z down (simulation) and Z up frames.
2008-03-04 08:53:27 +00:00
fredb
49b5c2058d Initialize variables before using them 2008-03-02 16:49:07 +00:00
durk
21df21b144 Olaf Flebbe: Micro update to the MSVC8 Project files. 2008-03-02 16:09:57 +00:00
fredb
620e71e800 Update MSVC 7.1 projects 2008-02-28 21:25:44 +00:00
mfranz
db2216848d don't reset visibility modifier in the M5SM case 2008-02-20 23:36:27 +00:00
mfranz
cfffe91ed5 Syd ADAMS: remove season suffix, this is now done via <condition>s 2008-02-16 22:09:40 +00:00
mfranz
a95aed1047 remove getRootNode(), as this resets the model root 2008-02-16 17:01:01 +00:00
mfranz
2883a36c76 Csaba HALASZ: implement conditional (e.g. seasonal) texture loading at startup 2008-02-15 17:54:01 +00:00
timoore
ac4245013f Cleanup of particles contribution
Put particles classes inside simgear namespace

Refactored some redundant code

Reworked local frame math to use OSG math classes as much as possible
2008-02-15 06:44:24 +00:00
timoore
b09e484492 particles from Tiago_G 2008-02-15 06:44:05 +00:00
timoore
dc63ddb010 Small cleanup of tree shader 2008-02-07 23:01:32 +00:00
timoore
09778a8eab Minor cleanup of Stuart Buchanan's tree patch.
Separate random objects and random trees for real.
2008-02-07 23:01:16 +00:00
timoore
8cbe9f1bd0 Second trees patch from Stuart Buchanan
Adds random variation of tree texture maps
2008-02-07 23:00:23 +00:00
timoore
be61689458 Cleanup and performance tuning of the random trees code.
The QuadTreeBuilder class was completely revamped as a templated class
to support flexible creation of scene graph quad trees, and a major
bug was fixed as well. Now it actually generates quadtrees instead of
some weird striped thing.

One StateSet is shared among all the "forests." The trees are drawn
after normal terrain objects to minimize some of the transparency
related artifacts.

Lighting was implemented in the ShaderGeometry shader (for both
polygon sides). Ambient-diffuse values for trees are hard-coded in
TreeBin.cxx.

DotOsg wrappers were added for ShaderGeometry so it can be output in
the scene graph dump.
2008-02-02 23:01:27 +00:00
timoore
4b63bc051e Random trees from Stuart Buchanan
Stuart's new file SGTreeBin.hxx has been split into 4 files:
TreeBin.[ch]xx and ShaderGeometry.[ch]xx.
2008-02-02 23:01:05 +00:00
timoore
a098ba5e79 Memory leak fixes from Till Busch 2008-01-24 23:05:18 +00:00
fredb
edee4b3fe5 Update MSVC 7.1 projects 2008-01-17 21:41:48 +00:00
timoore
0c9013e60e fix memory leaks in random object code
Don't allocate mt structures (for the random number generator) on the heap.
2008-01-17 08:28:15 +00:00
fredb
701c4bcf27 Avoid spitting gazillion 'Cannot find image file "" ' message on the console while loading random objects 2008-01-12 08:50:21 +00:00
frohlich
22f2fac56b Modified Files:
simgear/scene/model/animation.cxx:
	Change factor/offset order for texture animations.
	Fixes remaining bug with texture animations.
2008-01-07 22:05:48 +00:00
timoore
605125c0e7 Random object support from Stuart Buchanan
In addition to Stuart's changes, there's an independent quad tree
builder class for constructing loose quad trees from scene graph nodes.

Stuart also implemented changes to the random number generator suggested by
Andy Ross.
2008-01-06 15:04:43 +00:00
fredb
65d0ee126a Update MSVC 7.1 projects 2008-01-04 21:45:41 +00:00
fredb
4db6435090 Remove warnings 2008-01-04 21:45:14 +00:00
timoore
4383fd3c45 Give the sky a BACKGROUND_BIT nodemask
Add a MODEL_BIT and tag clouds with that.

Remove vestigial post_root from sky code.
2008-01-04 07:33:42 +00:00
timoore
b6be76b0ab background node mask 2008-01-04 07:33:23 +00:00
frohlich
92d8fa1193 Modified Files:
simgear/scene/model/SGClipGroup.cxx
	simgear/scene/model/SGClipGroup.hxx Update the clip group.
2007-12-31 15:49:01 +00:00
frohlich
9c51bf3edf Modified Files:
simgear/scene/model/animation.cxx: Create animation inputs if not
	already there. Fixes broken texture animations from past checkin.
2007-12-31 15:48:02 +00:00
frohlich
cf0e4e6f8c Modified Files:
Makefile.am SGPickCallback.hxx: add proirities for pick callbacks.
2007-12-26 19:19:51 +00:00
frohlich
c3719f35e3 Modified Files:
animation.cxx animation.hxx: Make use of the expression stuff.
	Factors out common code with other animations stuff in flightgear.
2007-12-26 19:12:04 +00:00
frohlich
0b1f074bcf Modified Files:
Makefile.am
Added Files:
	SGExpression.cxx SGExpression.hxx: Add not yet complete but already
	usable expression tree. Will be used with the panel code.
2007-12-26 19:10:40 +00:00
frohlich
7fe8514434 Modified Files:
scene/model/SGClipGroup.cxx: Oops, add missing simgear_config.h
2007-12-26 19:08:45 +00:00