ehofman
b1200f9f59
add alcSuspendContext and alcProcessContext again to prevent sound artifacts on hardware accelerated soundcards.
2009-12-06 23:55:08 +01:00
ehofman
47617d6c04
check if suspend, resume and volume changed much from the previous value before setting them.
2009-12-03 06:38:23 +01:00
ehofman
4794ab6095
Fix runtime switching of sound devices.
2009-12-03 06:38:12 +01:00
ehofman
bc85767f19
Updates to allow runtime chaning of the sound device
2009-11-30 22:41:14 +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
ehofman
a0aaa23904
Add a function to retreive all available playback devices.
2009-11-29 13:04:39 +01:00
ehofman
27a6c72091
initialize volume to a proper value
2009-11-29 13:04:39 +01:00
ehofman
2dcc66f03e
Small bugfix
2009-11-29 13:04:38 +01:00
ehofman
d70a05a088
Make it possible to specify a different device name
2009-11-29 13:04:38 +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
ehofman
0f21c39e49
a slightly more readable version of the test
2009-11-26 16:05:46 +01:00
ehofman
f6513127ce
Also test for older versions of OpenAL-Sample
2009-11-26 16:05:45 +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
ehofman
878288f06a
Don't forget to apply the doppler adjustment factor to the listener velocity also
2009-11-24 14:17:54 +01:00
ehofman
406cdf8d16
test for implementations with 'bad' doppler effects and adjust for it.
2009-11-24 14:17:54 +01:00
ehofman
5b28b024ae
fix test programs
2009-11-24 14:17:54 +01:00
ehofman
7c693d8107
proper listener velocity calculation, this has no effect yet but is required when other models start emitting sounds.
2009-11-24 14:17:54 +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
ehofman
afb18ca75b
the wrong name also mislead me: rotate velocity to the proper quat
2009-11-19 23:01:49 +01:00
ehofman
01c62932bd
make the relative positions fixed against the body again.
2009-11-18 23:25:55 +01:00
ehofman
6cd8db7b28
Set to default distance attenuation function but change the parameters a but for better sound effects (and most of all quieter sounds at greta distance
2009-11-18 23:25:51 +01:00
ehofman
bb46d91bc6
What do you know, the real problem turned out to be the distance attenuation function..
2009-11-17 06:43:41 +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
ehofman
e3f70b7125
temporarily remove listener (viewer) and source offsets. they mess things up
2009-11-12 22:59:43 +01:00
Tim Moore
a25e859fa7
fix typo
2009-11-10 22:10:57 +01:00
ehofman
5b2af1f6b3
also recalculate the velocity in update_pos_and_orienation, so pass the north-east-down velocity directly and orientate position, orientation and velocity to OpenGL/OpenAL frames (x-right, y-up and z-back)
2009-11-10 16:29:16 +01:00
ehofman
59df72c4b0
allow sound effects in the configuration file to be added to the 'avionics' sample group by setting '<type>avionics</type>'.
2009-11-10 06:42:26 +01:00