Commit Graph

7935 Commits

Author SHA1 Message Date
Robert Osfield
37765805ff Fixed pedantic warning 2008-06-23 15:11:37 +00:00
Robert Osfield
0b6e605795 From Mathias Froehlich, "fixed win32/win64 configure check and win32/win64
atomic related compile failures with msvs2005. Attached changes to make win32
really use the atomic stuff. There are pointer typecast problems and some
historic alignment restrictions that I just took from a previous similar
implementation of mine without looking deep enough. "
2008-06-23 14:51:34 +00:00
Robert Osfield
62fb2d4634 From Mathieu Marache, "Suibject: CMakeList ADD_DEFINITION for CMAKE_DEBUG_POSTFIX broken
I needed a -DCMAKE_DEBUG_POSTFIX="d" not a -D"CMAKE_DEBUG_POSTFIX=d".

This corrects the build for the CMake 2.4 and 2.6 series

The error was in compiling osgDB/Registry.cpp
"
2008-06-23 11:14:06 +00:00
Robert Osfield
87b74c1f54 Commented out the explict install of the Config files as including these files into
the header list allows the normal Cmake install support to install them.
2008-06-23 10:18:04 +00:00
Robert Osfield
275811d02a From Eric Sokolowsky, "I have made a number of changes intended to get a few things working better on OSX. However, since I'm still pretty new at Mac development and cmake I'm not entirely certain that the changes I have made are benign on other platforms. I have tested these changes on Leopard with CMake 2.6 generating Xcode 3.0 projects, compiling on ppc and i386 for 10.5 and 10.4, and on Linux (CentOS) and everything still seems to work ok. Here are the changes I made (against OSG svn as of this afternoon):
- Added osgviewerCocoa example to APPLE builds
- Fixed corrupt Xcode project generation with CMake 2.6 dealing with ADD_DEFINITIONS and CMake Policy CMP0005 on Leopard
- Resolved CMP0006 warning for examples and programs by setting BUNDLE DESTINATION to same as RUNTIME DESTINATION with CMake 2.6
- Fixed freetype plugin on Leopard to avoid OpenGL linking problem
- Figured out how to use a custom Info.plist included in the project (see osgviewerCocoa application CMakeLists.txt)"
2008-06-23 09:57:45 +00:00
Stephan Maximilian HUBER
6766039ef7 From Stephan Huber: added missing config files and updated xcode-project 2008-06-23 08:06:07 +00:00
Robert Osfield
1e3183a355 Quietened down debug info 2008-06-21 17:56:38 +00:00
Robert Osfield
af271f99ec Added support for X11's overrideRedirect functionality 2008-06-21 17:50:58 +00:00
Robert Osfield
113a77b219 Converted tabs to four spaces 2008-06-21 11:34:01 +00:00
Robert Osfield
415d45525c Changed the include/osg/Config and include/OpenThreads/Config references to use the assocaited CMake variable for these headers 2008-06-20 19:52:14 +00:00
Robert Osfield
e56ff4d5c6 Updated ChangeLog 2008-06-20 19:51:21 +00:00
Robert Osfield
ff811736fc From Terry Welsh, added missing MixinVector header 2008-06-20 17:32:27 +00:00
Robert Osfield
779a7c46ac Added OSG_WINDOWING_SYSTEM cmake option string to allow toggling between X11 and Carbon under OSX. 2008-06-20 16:57:22 +00:00
Robert Osfield
a71939c5bb From Mathias Froehlich, moved optional config variables into include/osg/Config file that
is automatically created by cmake according to its own settings.
2008-06-20 15:50:53 +00:00
Robert Osfield
7b19b987ec Updated ChangeLog 2008-06-20 15:49:15 +00:00
Robert Osfield
8aa7c330f8 Changed const double* to const Matrix::value_type* to ensure changes in Matrix type don't break the build 2008-06-20 15:28:38 +00:00
Robert Osfield
be185cb3af From Terry Welsh, new flatten static transforms visitor that duplicates subgraphs that are shared beneath differnt static transforms
From Robert Osfield, made a range of changes to Terry's visitor integrating it into osgUtil::Optimizer and 
changing the code to use a style more like the rest of the OSG.
2008-06-20 13:16:35 +00:00
Robert Osfield
ce13510b47 From Mathias Froehlich, made the include of bin directory for include/OpenThreads/Config only used when doing out of source builds 2008-06-20 11:16:06 +00:00
Robert Osfield
bc6e5b5da2 Updated version numbers for dev releases 2008-06-20 11:11:47 +00:00
Robert Osfield
0e7920f144 From Mathias Froehlich, "Fixes a compile of src/osgSim/ShapeAttribute.cpp on suse 10.2." 2008-06-20 10:46:33 +00:00
Robert Osfield
3672ba51e7 From Melchior Franz, fixed typo on variable name 2008-06-20 09:46:45 +00:00
Robert Osfield
5db501941d From Mathias Froehlich, add search path to enable out of source builds to find include/OpenThreads/Config. 2008-06-20 09:42:57 +00:00
Robert Osfield
96a80666c9 Updated wrappers 2008-06-19 20:42:10 +00:00
Robert Osfield
2011028ee7 From Neil Groves,
"I have taken the liberty of updating a few files so that there is no longer any derivation from std::vector. I have done this by adding a new file osg/MixinVector and by updating only two others: osg/PrimitiveSet and osg/Array. You will notice that this actually removes what is acknowledged as a \u2018hack\u2019 in osg/PrimitiveSet.

With the original code I did manage to find memory leaks with some compiler options on VC 8 and 9, as well as Intel compiler. I determined the leak existence by instrumenting the destructor code, and by use of a garbage collector as a leak detector (in a similar manner to the Firefox project). Hence in contrast to what I said originally, it is exhibiting symptoms on at least some platforms.

Since I am trying to be a good OSG citizen I got out my editor and started hacking! I have built and tested on Linux (Ubuntu) with GCC 4.x and Windows VC 8 SP1. It appears that nothing is broken, and that I\u2019m using less memory J"
2008-06-19 20:38:38 +00:00
Robert Osfield
d6469b87c1 From Mathieu Marache, "submission for inclusion to support mpg and avi files when using the quicktime plugin on windows" 2008-06-19 17:35:45 +00:00
Robert Osfield
936edacc92 From Mathias Froehlich, added support for using OpenThreads::Atomic for thread safe ref/unref. 2008-06-19 17:30:38 +00:00
Robert Osfield
2ba5f002d2 from Andrew Bettison, LineStipple support for .ive 2008-06-19 14:57:36 +00:00
Robert Osfield
0faaf93dc2 From Adrian Egli, "Improvements to the PSSM implementation" 2008-06-19 14:45:54 +00:00
Robert Osfield
cc9d12f34f From Rudolf Weidemann, "in the OpenFlight format materials can have editable names.
In the OSG OpenFlight plugin these names are ignored when reading, and
empty strings are written.

As we need these names in the OSG scene graph by our application, I
changed the plugin code, so the names are now stored in class
"osg::Material" (derived from "osg::Object") by
 material->setName();
(see "PaletteRecords.cpp, line 195) when reading the file, and written
to file by
 dos.writeString( m.Material->getName(), 12 );
(see MaterialPaletteManager.cpp, line 80).

As these names otherwise get lost when reading an OpenFlight file and
writing it again e.g. by
 osgconv example.flt converted_example.flt
these changes make the plugin more complete.

The changes were made to OSG revision 8425, and were tested by
 osgconv example.flt converted_example.flt
comparing the material palettes of both files inside Multigen Creator."
2008-06-19 14:35:18 +00:00
Robert Osfield
dd13893861 From Farshid Lashkari, "I noticed some problems when setting up CameraNodes that inherit
viewport settings in stereo mode. It seems that the SceneView::cull()
method will pass the full size viewport to the left/right
cullvisitors, instead of the modified stereo viewport. I made quite a
few changes to SceneView to fix the issue. The SceneView::cullStage()
method will now receive the viewport as an argument, instead of using
the global viewport. The SceneView::cull() method will pass the
modifed viewport to cullStage when rendering in stereo.

There are 2 new private methods computeLeftEyeViewport() and
computeRightEyeViewport() that will compute the stereo viewports. I
also modified the draw() function so it applies the correct viewport
to the prerender stages. These changes are only necessary for
horizontal/vertical split stereo."
2008-06-19 14:29:38 +00:00
Robert Osfield
c3c727b822 From Andrew Bettison, "Attached are changes for src/osgPlugins/ive (version 2.4.0) that implement LineStipple read/write support for the ive file format." 2008-06-19 14:14:20 +00:00
Robert Osfield
37d81679b7 From Paul Melis, "Here is a reworked version of the osgviewerWX example. It changes the GraphicsWindowWX to only inherit from osgViewer::GraphicsWindow and adds a standalone widget, called OSGCanvas, that derives from wxGLCanvas. This solves a problem with the GraphicsWindowWX instance being destructed twice (see "Crash in osgviewerWX" of June 12th on osg-users). At program exit, the main frame deletes all of its children widgets and therefore calls GraphicsWindowWX's destructor, bypassing OSG's reference counting. The GraphicsWindowWX instance is then later destructed a second time when the reference held by osg::Camera goes to zero. This bug isn't exposed by the example directly, but if people are going to use the example as a basis (like the poster in the mentioned thread) they very likely will run into this problem.
"
2008-06-19 13:49:36 +00:00
Robert Osfield
4c9b3de4a1 Updated wrappers to fix OpenThreads::Atomic build issues. 2008-06-19 13:28:33 +00:00
Robert Osfield
a94cfccdce From Michael Platings, fixed typo error in renderbin assignment 2008-06-19 12:02:20 +00:00
Robert Osfield
061be3d084 In Program::PerContextProgram changed const Uniform* to osg::ref_ptr<const Uniform*> to avoid the possibility of a uniform being deleted
and another being created and assigned at the same address which previously confused the uniform tracking code and introduced a bug.
2008-06-19 11:58:34 +00:00
Robert Osfield
174f9bbfe0 From Michael Platings and Robert Osfield, added support for controlling,
via StateSet::setNestedRenderBin(bool) whether the new RenderBin should be nested
with the existing RenderBin, or be nested with the enclosing RenderStage.
2008-06-19 11:09:20 +00:00
Robert Osfield
0abf539b60 Updated wrappers 2008-06-18 20:27:06 +00:00
Robert Osfield
f06d50a7eb From Michael Platings, implemented check against max number of supported samples to ensure that the number of samples is safely capped to what the hardware is capable of, avoiding GL errors and graceful fallback 2008-06-18 20:24:12 +00:00
Robert Osfield
45fcb25765 From Liang Aibin:
"1. Location: <OSG_SOURCE_ROOT>\src\osgPlugins\osg\Fog.cpp
   Reason: ".osg" writter plugins output incorrected string for osg::Fog's Mode.
   How to Fix:
     Line 138 in Fog.cpp: case(Fog::LINEAR): return "NERVER";
     Change to:           case(Fog::LINEAR): return "LINEAR";
2. Location: <OSG_SOURCE_ROOT>\src\osgPlugins\ive\
   Reason: ".ive" writter plugins missing to process "osg::Fog".
   How to Fix:
   (1). Line 86 in ReadWrite.h:
        Add: #define IVEFOG                          0x00001133
   (2). In CMakeLists.txt
        "SET(TARGET_SRC" section Add: Fog.cpp
        "SET(TARGET_H" section Add: Fog.h
   (3). In DataInputStream.cpp
        Line 54,Add:    #include "Fog.h"
        Line 1185,Add:  else if(attributeID == IVEFOG){
                            attribute = new osg::Fog();
                            ((ive::Fog*)(attribute))->read(this);
                        }
   (4). In DataOutputStream.cpp
        Line 57,Add:    #include "Fog.h"
        Line 832,Add:   // This is a Fog
                        else if(dynamic_cast<const osg::Fog*>(attribute)){
                            ((ive::Fog*)(attribute))->write(this);
                        }
   (5). Add newly created ive::Fog Object in Fog.h and Fog.cpp.
"
2008-06-18 20:17:13 +00:00
Robert Osfield
0a0034aebb Updated wrappers 2008-06-18 16:46:38 +00:00
Robert Osfield
1e5783ece7 Added a wrapString(const char*) which automatically handles null strings. 2008-06-18 16:45:21 +00:00
Robert Osfield
959c01557c Convert string handling to use strdup and free rather then awkward new char[]
code paths
2008-06-18 16:28:52 +00:00
Robert Osfield
7ae28bea0d Added --fbo-samples value and --color-samples value command line paramters for enabling fbo multisampling 2008-06-18 14:21:22 +00:00
Robert Osfield
90ea0bd95f From Michael Platings and Paul Palumbo, multi-sample FBO support 2008-06-18 14:09:11 +00:00
Robert Osfield
7bef1bd16a From Jean-Sebastien Guay, "When copying a node that had uniforms on it, the copy constructor of osg::Uniform would not copy the array of the original uniform (either _intArray or _floatArray) because none had been allocated and the copy constructor checks that *both* this's array and rhs's array are valid.
I added a call to allocateDataArray() if rhs has (at least) one valid array, which should allocate the right array according to the type. Since the type was copied from rhs, it should create the same array as rhs has, so then it should copy the data in the following lines.
"
2008-06-18 12:01:52 +00:00
Robert Osfield
df87106d4b From Bob Kuehne, "added multi-texture support (alpha/trans images)" 2008-06-18 11:56:50 +00:00
Robert Osfield
b82e24b08d Updated wrappers 2008-06-18 11:51:22 +00:00
Robert Osfield
dd137c2442 From Bob Kuehne, "this submission extends the osgViewer::RecordCameraPathHandler to have an optionally-enabled auto-incrementing filename. default behavior is still the same, but there's one new method to enable autoincrementing filenames."
From Robert Osfield, modified the above so that the number increments come after the filename rather than before.
2008-06-18 11:13:51 +00:00
Robert Osfield
bc79df7cd8 From Gino van den Bergen, "Added support for vrml primitive caching" 2008-06-18 10:51:02 +00:00
Robert Osfield
7dc3ad4b5e From David Callu, "fixed bounding box bug" 2008-06-18 10:46:05 +00:00