osg2cpp application to me today. The conversion result may become
incorrect if there are quotation marks ( " ) in the shader file, which
will mostly appear in comment lines.
Replace all " into \" before writing to cpp files will solve the
problem, as the attached file shows."
see http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/CMakeLists.txt
the option OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS is set to ON only after the subdirectories are added,
this causes /MANIFEST:NO while the option is ON after the first configure, generate.
if this option is moved (i.e. above the ADD_SUBDIRECTORY statement) results are as expected.
attached you will find the correct CMakeLists.txt
"
CID 11812: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _lastFrameUsed is not initialized in this constructor nor in any functions that it calls.
Non-static class member _s is not initialized in this constructor nor in any functions that it calls.
Non-static class member _t is not initialized in this constructor nor in any functions that it calls.
CID 11813: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _endian is not initialized in this constructor nor in any functions that it calls.
CID 11814: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _updateCamera is not initialized in this constructor nor in any functions that it calls.
CID 11815: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _cosMaxElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMaxFadeElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMinElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMinFadeElevation is not initialized in this constructor nor in any functions that it calls.
CID 11820: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _azAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _elevAngle is not initialized in this constructor nor in any functions that it calls.
CID 11819: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _BoundaryAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _planeOrientation is not initialized in this constructor nor in any functions that it calls.
CID 11818: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _BoundaryAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _planeOrientation is not initialized in this constructor nor in any functions that it calls.
CID 11817: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _distance is not initialized in this constructor nor in any functions that it calls.
CID 11817: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _distance is not initialized in this constructor nor in any functions that it calls.
CID 11816: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _leftRightSurfaces is not initialized in this constructor nor in any functions that it calls.
CID 11821: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _traversalNumber is not initialized in this constructor nor in any functions that it calls.
CID 11822: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _traversalNumber is not initialized in this constructor nor in any functions that it calls.
CID 11828: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member distance is not initialized in this constructor nor in any functions that it calls.
Non-static class member maxDistance is not initialized in this constructor nor in any functions that it calls.
Non-static class member numIntersectionPoints is not initialized in this constructor nor in any functions that it calls.
Non-static class member primitiveIndex is not initialized in this constructor nor in any functions that it calls.
CID 11838: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _alphaFuncKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cyleBackwardKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cyleForwardKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _sampleDensityKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _transparencyKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateAlphaCutOff is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateSampleDensity is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateTransparency is not initialized in this constructor nor in any functions that it calls.
CID 11827: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _plane_mask is not initialized in this constructor nor in any functions that it calls.
CID 11830: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _geometry is not initialized in this constructor nor in any functions that it calls.
CID 11825: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _ratio is not initialized in this constructor nor in any functions that it calls.
CID 11824: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _hit is not initialized in this constructor nor in any functions that it calls.
Non-static class member _index is not initialized in this constructor nor in any functions that it calls.
Non-static class member _length is not initialized in this constructor nor in any functions that it calls.
Non-static class member _ratio is not initialized in this constructor nor in any functions that it calls.
CID 11829: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveMode is not initialized in this constructor nor in any functions that it calls.
CID 11836: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _fullscreen is not initialized in this constructor nor in any functions that it calls.
CID 11831: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _context is not initialized in this constructor nor in any functions that it calls.
Non-static class member _dc is not initialized in this constructor nor in any functions that it calls.
Non-static class member _handle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _instance is not initialized in this constructor nor in any functions that it calls.
CID 11835: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _startTick is not initialized in this constructor nor in any functions that it calls.
CID 11834: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _tickLastUpdated is not initialized in this constructor nor in any functions that it calls.
Non-static class member _tmpText is not initialized in this constructor nor in any functions that it calls.
CID 11833: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _tmpText is not initialized in this constructor nor in any functions that it calls.
CID 11843: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _inexp is not initialized in this constructor nor in any functions that it calls.
Non-static class member _outexp is not initialized in this constructor nor in any functions that it calls.
CID 11842: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _inexp is not initialized in this constructor nor in any functions that it calls.
Non-static class member _outexp is not initialized in this constructor nor in any functions that it calls.
WindowManager.cpp
CID 11841: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _lastEvent is not initialized in this constructor nor in any functions that it calls.
Non-static class member _lastPush is not initialized in this constructor nor in any functions that it calls.
Non-static class member _view is not initialized in this constructor nor in any functions that it calls.
Frame.cpp
CID 11840: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _flags is not initialized in this constructor nor in any functions that it calls.
Window.cpp
CID 11839: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _index is not initialized in this constructor nor in any functions that it calls.
CID 11441: Non-array delete for scalars (DELETE_ARRAY)
"_dwobj::readOpenings(_iobuf *, int)" allocates "obj.fc1". [show details]
"_dwobj::~_dwobj()" uses delete on "obj.fc1" which is an array. It should be deleted with operator delete[]. [show details]
CID 11394: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->colorindices" = "new osg::IntArray".
The constructor allocates field "colorindices" of "struct vertexInfo" but there is no destructor.
CID 11395: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->coordindices" = "new osg::IntArray".
The constructor allocates field "coordindices" of "struct vertexInfo" but there is no destructor.
CID 11396: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->normindices" = "new osg::IntArray".
The constructor allocates field "normindices" of "struct vertexInfo" but there is no destructor.
CID 11397: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->txindices" = "new osg::IntArray".
The constructor allocates field "txindices" of "struct vertexInfo" but there is no destructor.
CID 11398: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec2Array".
Assigning: "this->txcoords" = "new osg::Vec2Array".
The constructor allocates field "txcoords" of "struct vertexInfo" but there is no destructor.
CID 11399: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->norms" = "new osg::Vec3Array".
The constructor allocates field "norms" of "struct vertexInfo" but there is no destructor.
CID 11400: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->coords" = "new osg::Vec3Array".
The constructor allocates field "coords" of "struct vertexInfo" but there is no destructor.
CID 11401: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec4Array".
Assigning: "this->colors" = "new osg::Vec4Array".
The constructor allocates field "colors" of "struct vertexInfo" but there is no destructor.
CID 11402: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec4Array".
Assigning: "this->polycols" = "new osg::Vec4Array".
The constructor allocates field "polycols" of "struct vertexInfo" but there is no destructor.
CID 11388: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new char[numBytes]".
Assigning: "this->_startPtr" = "new char[numBytes]".
The constructor allocates field "_startPtr" of "struct DataConverter" but there is no destructor.
Assigning: "this->_currentPtr" = "new char[numBytes]".
The constructor allocates field "_currentPtr" of "struct DataConverter" but there is no destructor.
CID 12263: Missing break in switch (MISSING_BREAK)
This case (value 8) is not terminated by a 'break' statement.
CID 12262: Missing break in switch (MISSING_BREAK)
This case (value 7) is not terminated by a 'break' statement.
CID 12261: Missing break in switch (MISSING_BREAK)
This case (value 6) is not terminated by a 'break' statement.
CID 10392: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.
CID 10454: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.
CID 10505: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.
CID 10919: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.
CID 10920: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.
CID 11389: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new bsp::VBSPData".
Assigning: "this->bsp_data" = "new bsp::VBSPData".
The constructor allocates field "bsp_data" of "struct bsp::VBSPReader" but the destructor and whatever functions it calls do not free it.
ID 11390: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->vertices" = "new osg::Vec3Array".
The constructor allocates field "vertices" of "struct prims" but the destructor and whatever functions it calls do not free it.
CID 11391: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->normals" = "new osg::Vec3Array".
The constructor allocates field "normals" of "struct prims" but the destructor and whatever functions it calls do not free it.
CID 11392: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->txc" = "new osg::Vec3Array".
The constructor allocates field "txc" of "struct prims" but the destructor and whatever functions it calls do not free it.
CID 11393: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->txcoords" = "new osg::Vec3Array".
The constructor allocates field "txcoords" of "struct prims" but the destructor and whatever functions it calls do not free it.
CID 11747: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member gset is not initialized in this constructor nor in any functions that it calls.
CID 11844: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _defaultValue is not initialized in this constructor nor in any functions that it calls.
Index: ../include/osgDB/Serializer
CID 11851: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(26)" is never used.
CID 11850: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(80)" is never used.
CID 11849: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(3)" is never used.
CID 11848: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "grec->getField(3)" is never used.
implement the recently introduced setSyncToVBlank-method.
Additionally I added a ToggleSyncToVBlank-eventhandler to osgViewer. I
used it to test the code, perhaps you'll find it useful and include it
in the distribution."