Commit Graph

2454 Commits

Author SHA1 Message Date
timoore
f182886fce Start of cleanup of scene graph node masks 2007-11-29 23:55:35 +00:00
timoore
2fbaddbecf Move SGReadFileCallback from model.cxx to public class ModelRegistry
Move SGReadFileCallback and all its help classes into a new
ModelRegistry class that also provides an interface to add custom
callbacks for specific file extensions. SGReaderWriterBTG uses that to
keep any further processing from being done on .btg files. Various
namespace-releated cleanup was done on this code too.
2007-11-29 23:55:01 +00:00
timoore
cafcecf03d StateSet optimizations
Use only one shared StateSet to control GL_NORMALIZE. This removes
thousands of state sets from the scene graph.

Fix a typo that was causing two copies of groundLights0 to be added to
each tile.
2007-11-18 23:31:03 +00:00
timoore
49473845cf Some scene graph optimizations
When loading terrain, use DrawElementsUShort where possible.

Don't chunk unconnected triangles in the terrain into seperate
Geometry sets; make the sets as big as possible.
2007-11-18 23:30:34 +00:00
durk
d4d4ed22a0 Minor documentation updates. 2007-11-18 14:21:41 +00:00
durk
240ed6f0b1 Refined debug timing control:
- Added a SampleStatistic class (from the old deprecated libg++) library.
 - Make time statistics and printing conditionable
 - Added an interface function to switch time stamp collection and printing
   on and off from the application (defaults to off).
2007-11-17 09:16:58 +00:00
frohlich
084a24e958 Improove texture sharing. 2007-11-09 05:55:50 +00:00
frohlich
cd9e3648e9 Update node masks 2007-11-09 05:52:58 +00:00
curt
7ed51be4e6 In the original flightgear native/binary scenery terrain data format, we
used short's extensively to represent counts of objects (number of points,
number of texture coordinates, number of traingle strips, etc.) and we used
shorts to index into larger structures.  But this capped many of our structure
sizes to a maximum of 32768.

By switching to unsigned shorts in the future, we can double the maximum
object/index counts without losing anything.  This was a pretty major
oversight in our original specification.

I have bumped up the native object file version from 6 to 7 and added code
in the reader to maintain full backwards compatibilty with version 6
scenery files (i.e. the current 0.9.10 scenery release.)

Curt.
2007-11-05 21:42:29 +00:00
durk
0c8358ae67 - A few fixes to ensure SimGear compiles again on cygwin.
* on cygwin, isnan is declared in ieeepf.h
  * CYGWIN is a special case in that it is windows based, but sometimes
    folows unix conventions. SGAtomic compilation failed on an illegal
    volatile type cast without the additional __CYGWIN__ define check.
2007-10-15 18:49:50 +00:00
durk
25cefd9129 * Fixed memory leak in RenderTexture.cpp (tiny, but still...)
* Added Timestamping debugging code to SGSubsystems (ported from plib
  branch).
2007-10-14 13:46:13 +00:00
timoore
af75c0ca0c Add ability to override existing model files with .osg files.
This enables off-line optimization of models and other special effects.
2007-10-12 22:46:35 +00:00
timoore
a91b2629d3 Manage OSG object cache explicitly
Don't have Registry::ReadNodeImplementation store its results in the
object cache; instead store the optimized model in the cache.
2007-10-12 22:46:13 +00:00
mfranz
de9070dba1 better standard compliance: allow empty top level tags (<PropertyList>) 2007-10-10 12:45:53 +00:00
timoore
813b518b6f Don't reset the random texture base when rebuilding a cloud layer
This fix removes obnoxious visuals (texture jumping) when a cloud
layer is moved due to a metar update or, more significantly, when
switching from metar to a scenario. Also, I switched to using a TexMat
to displace the cloud texture in order to avoid writing the texture
array every frame.
2007-10-04 20:53:22 +00:00
timoore
c47e800f60 Order the cloud layers properly using OSG RenderBin 2007-10-02 21:43:52 +00:00
timoore
8398f45d43 ocean state set in osg::Geometry
Put the ocean tile state set in osg::Geometry, not the osg::Geode, so that
is readily available during intersection testing and can be used to find the
corresponding SGMaterial.

Problem reported by grtux (gh.robin@laposte.net)
2007-09-30 19:51:49 +00:00
timoore
aeaaa50f6c Fix material animations with only a <texture-prop>
On 8/31/07, K. Hoercher <wbhoer@gmail.com> wrote:
> > Some notes:
> > - I found that in order to make the example from model-howto.html work
> > ( starting at "To make a texture replaceable at runtime") one has to
> > specify a valid (i.e. loadable) <texture>  in the material animation.

The cause seems to be the condition in SGMaterialAnimation.cxx l.277
ignoring any texture update by the UpdateCallback (only there
<texture-prop> is looked at)  without an already existing stateSet.
That in turn will not be created with a <texture-prop> alone l. 379ff.

Unless I overlooked some compelling reason contradicting, I'd like to
suggest allowing for a stateSet to be created for those situations
too. I think that would match the behaviour of animation.cxx
(PRE_OSG_PLIB_20061029) and is imho the more expected and also
documented one.
2007-09-05 22:12:00 +00:00
durk
f33ce846b8 Change "FlightGear" to "SimGear" of course. 2007-09-01 12:57:53 +00:00
durk
4718b9dc07 Added a check for OpenSceneGraph and created some basic documentation. 2007-09-01 12:55:46 +00:00
durk
fba00f7c5a Add separate check for openal and ALUT, as these are now separate. 2007-09-01 10:04:36 +00:00
durk
3360383fd7 Documentation fixes: Updated the contents of README.plib and README.OpenAL
Also make sure that these files are included in the release. This is
required, since ./configure refers to these files.
2007-09-01 09:45:21 +00:00
timoore
6c30f62693 Add curvature to ocean tiles.
An apron around the tile hides cracks with coastal tiles.

The VectorArrayAdapter, which lives in the simgear namespace, is a useful
utility class for treating vectors as 2D arrays.
2007-08-12 21:03:43 +00:00
timoore
ab5b0382da Ocean tile detail work in progress 2007-08-12 21:02:54 +00:00
fredb
671f3f5890 Update MSVC 7.1 projects 2007-08-12 13:40:16 +00:00
fredb
9bae445624 Fix a typo 2007-08-12 13:32:42 +00:00
frohlich
30529ccdf5 Modified Files:
projects/VC7.1/SimGear.vcproj projects/VC8/SimGear.vcproj
	simgear/math/Makefile.am simgear/math/SGGeoc.hxx
	simgear/math/SGGeodesy.cxx simgear/math/SGGeodesy.hxx
	simgear/math/polar3d.hxx simgear/math/sg_geodesy.hxx
	simgear/math/sg_types.hxx
Removed Files:
	simgear/math/polar3d.cxx simgear/math/sg_geodesy.cxx
	simgear/math/sg_memory.h:
	Remove sg_memory.h It is unused anyway and should not be required
	in a c++ world. Move distance course functions to the SG* type
	system. Move the implementation into SGGeodesy.cxx. Remove some of
	the old Point3D Based sg* functions that are already unused.
2007-08-07 05:26:21 +00:00
frohlich
a8a02d3a2e Modified Files:
projects/VC8/SimGear.vcproj:
	MSVC8 Build system updates from Olaf Flebbe.
2007-08-07 04:59:09 +00:00
andy
5da33ca244 Melchior discovered that call(call) would crash due to a longstanding bug with argument parsing 2007-08-01 22:46:12 +00:00
andy
04c1e95f08 Fix crash in code generator for some bad lvalue expressions 2007-08-01 22:33:01 +00:00
andy
2186fc1fc7 Add ppc64 to the list of supported platforms based on testing by Tom Callaway at Red Hat 2007-07-31 20:57:21 +00:00
timoore
fb49a9192e Fix ocean texture scaling problem. 2007-07-31 06:39:26 +00:00
curt
ccbc5abec6 Remove an extern SGSky *thesky reference that isn't used in the code anyway.
The original code forced a dependency in SimGear back to something that is
defined globaly in FlightGear, not a great strategy for a library with some
"general purpose" intentions.
2007-07-31 01:21:21 +00:00
timoore
7aa6fd479d OSG Reader and Writer for BTG files
This is part of a somewhat long road towards terrain database paging using
OSG's database pager thread.
2007-07-29 22:32:58 +00:00
frohlich
3fcc16c1a0 Modified Files:
simgear/math/SGGeoc.hxx: Fix unit conversion problem
2007-07-27 19:27:24 +00:00
timoore
b3e0298189 SimGear: Typo in Thanks file
Fix typo

Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
Committer: Tim Moore <moore@redhat.com>
2007-07-23 22:00:31 +00:00
timoore
7e1fe7d852 SimGear: Properly print compilers in configure.ac
Print $CC and $CXX using the proper configure.ac mechanism

Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
Signed-off-by: Tim Moore <timoore@redhat.com>
2007-07-23 21:45:11 +00:00
timoore
5d7d77d4b6 Allow parallel make ("make -j2") by giving make the opportunity to
determine dependencies.

As in subdirectory foo/bar, $(top_builddir)/foo/bar is defined to be the
current directory, this does not cause any regressions.

From Hans Ulrich Niedermann (hun@n-dimensional.de)
2007-07-22 22:37:26 +00:00
timoore
418856769b Support for reading and writing nodes in .osg files, plus some new accessors. 2007-07-22 20:06:20 +00:00
mfranz
46a32dd3ee coding style fixes 2007-07-22 13:58:26 +00:00
mfranz
ecb4dc57b4 Maik JUSTUS: workaround for broken Doppler effect in OpenAL
mf: this patch is meant to be removed as soon as OpenAL got fixed. (The
    OpenAL developers acknowleged the bug and announced that it'll get
    fixed.) For removal try
    $ cd simgear/sound
    $ cvs diff -rAFTER_OPENAL_DOPPLER_WORKAROUND -rBEFORE_OPENAL_DOPPLER_WORKAROUND|patch
2007-07-22 13:50:24 +00:00
mfranz
89d426470b Maik JUSTUS: Doppler fixes (add option to turn off Doppler for sounds that
shouldn't be affected -- marker beep, ATIS messages, etc.)

mf: this is the first part of the original patch. It is supposed to contain
    fixes that are not caused by OpenAL bugs, and thus aren't meant to be
    reverted later. The second part will contain a temprary workaround for
    OpenAL bugs. Unfortunately, I had to do the split myself as the contributor
    refused to do it.
2007-07-22 13:33:23 +00:00
mfranz
23c7a1b5b7 - close loophole through which one could sneak in illegal property names
containing slashes, colons and all sorts of evil characters. In Nasal
  this could be done via props.globals.getChild("1!@#$//[]{}", 0, 1).setValue(0);
  The cause is that getChild() hands the given name directly over to an
  alternative SGPropertyNode ("convenience") constructor which sets the
  name without any checks.
- unify exception messages: first character is lower case
2007-07-17 14:52:51 +00:00
frohlich
3b21e9434f Modified Files:
simgear/route/route.hxx: Remove unused include.
2007-07-08 08:43:40 +00:00
frohlich
d4a4428e64 Modified Files:
simgear/route/waypoint.hxx simgear/route/waypoint.cxx: Use const
	refs where possible.
2007-07-08 08:43:15 +00:00
mfranz
2dfc057135 replace exit() by throw sg_exception(). Of course, we have to be aware
that interdependencies between sg libs are generally unwelcome, but
sg_exception is a rather basic part, and it's already used by xml, props,
scene, sound and, of course, structure. Since props and xml are core
libs, we can assume that sg_exceptions are available.  (OK'ed by Curt)
2007-07-02 15:42:19 +00:00
mfranz
a25eebef9b add SG_ORIGIN macro that expands to a string __FILE__":"__LINE__
Note that __LINE__ is a number and can't be directly used in string
context, which makes the macro worthwhile. (IMHO :-)
2007-07-02 12:55:10 +00:00
mfranz
741c4ca15a back out last changes (radar patch) 2007-06-29 22:45:37 +00:00
mfranz
0bcdf2e4dc easyxml.cxx: add missing endXML visitor call
testEasyXML.cxx: beef it up
2007-06-29 10:46:52 +00:00
mfranz
cd5a720211 Vivian MEAZZA: add support for aircraft radar signatures 2007-06-24 08:09:07 +00:00