"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"
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."
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."
via StateSet::setNestedRenderBin(bool) whether the new RenderBin should be nested
with the existing RenderBin, or be nested with the enclosing RenderStage.
"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.
"
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.
"
This was easy to implement simply by overriding IntersectionVisitor::apply(PagedLOD). My question is: Are there any opinions on whether this should be the default behavior? If it makes sense, I will submit the change; if not, no worries."