diff --git a/examples/osgSSBO/osgSSBO.cpp b/examples/osgSSBO/osgSSBO.cpp index 4f5565301..8ece62447 100644 --- a/examples/osgSSBO/osgSSBO.cpp +++ b/examples/osgSSBO/osgSSBO.cpp @@ -119,7 +119,6 @@ enum BufferOffset const int __numDataValuesPerChannel = OFFSET_END; const int __numChannels = 4; -const float __particleRenderScaleMultiplier = 0.3; //512x512x4x7 = 7.340.032 floats in SSBO on GPU const int NUM_ELEMENTS_X = 512; diff --git a/examples/osgcluster/osgcluster.cpp b/examples/osgcluster/osgcluster.cpp index 85aac589a..b8994cfc7 100644 --- a/examples/osgcluster/osgcluster.cpp +++ b/examples/osgcluster/osgcluster.cpp @@ -44,7 +44,6 @@ #include "broadcaster.h" -const unsigned int MAX_NUM_EVENTS = 10; const unsigned int SWAP_BYTES_COMPARE = 0x12345678; class CameraPacket { public: diff --git a/examples/osggpucull/AggregateGeometryVisitor.h b/examples/osggpucull/AggregateGeometryVisitor.h index f569e8e85..8a2091247 100644 --- a/examples/osggpucull/AggregateGeometryVisitor.h +++ b/examples/osggpucull/AggregateGeometryVisitor.h @@ -287,4 +287,4 @@ protected: unsigned int _currentLodNumber; }; -#endif \ No newline at end of file +#endif diff --git a/examples/osgoit/DepthPeeling.cpp b/examples/osgoit/DepthPeeling.cpp index 52237d8f0..38e9296bc 100644 --- a/examples/osgoit/DepthPeeling.cpp +++ b/examples/osgoit/DepthPeeling.cpp @@ -139,10 +139,8 @@ protected: }; -DepthPeeling::CullCallback::CullCallback(unsigned int texUnit, unsigned int texWidth, unsigned int texHeight, unsigned int offsetValue) : +DepthPeeling::CullCallback::CullCallback(unsigned int texUnit, unsigned int offsetValue) : _texUnit(texUnit), - _texWidth(texWidth), - _texHeight(texHeight), _offsetValue(offsetValue) { } @@ -317,7 +315,7 @@ void DepthPeeling::createPeeling() // create some uniform and cull callback objects osg::Uniform *depthOff = new osg::Uniform("depthtest", (bool)false); osg::Uniform *depthOn = new osg::Uniform("depthtest", (bool)true); - CullCallback *ccb = new CullCallback(_texUnit, _texWidth, _texHeight, _offsetValue); + CullCallback *ccb = new CullCallback(_texUnit, _offsetValue); // create a node for solid model rendering osg::Group *pre_solidNode = new osg::Group; @@ -412,7 +410,7 @@ void DepthPeeling::createPeeling() _compositeCamera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); _compositeCamera->setViewMatrix(osg::Matrix()); _compositeCamera->setProjectionMatrix(osg::Matrix::ortho2D(0, 1, 0, 1)); - _compositeCamera->setCullCallback(new CullCallback(0, _texWidth, _texHeight, 0)); + _compositeCamera->setCullCallback(new CullCallback(0, 0)); osg::StateSet* stateSet = _compositeCamera->getOrCreateStateSet(); stateSet->setRenderBinDetails(100, "TraversalOrderBin", osg::StateSet::OVERRIDE_RENDERBIN_DETAILS); _root->addChild(_compositeCamera.get()); diff --git a/examples/osgoit/DepthPeeling.h b/examples/osgoit/DepthPeeling.h index 9598c7abf..1d0a35da6 100644 --- a/examples/osgoit/DepthPeeling.h +++ b/examples/osgoit/DepthPeeling.h @@ -63,13 +63,11 @@ protected: class CullCallback : public osg::NodeCallback { public: - CullCallback(unsigned int texUnit, unsigned int texWidth, unsigned int texHeight, unsigned int offsetValue); + CullCallback(unsigned int texUnit, unsigned int offsetValue); virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); private: unsigned int _texUnit; - unsigned int _texWidth; - unsigned int _texHeight; unsigned int _offsetValue; }; diff --git a/examples/osgparticleeffects/osgparticleeffects.cpp b/examples/osgparticleeffects/osgparticleeffects.cpp index 03be3c077..2399905c7 100644 --- a/examples/osgparticleeffects/osgparticleeffects.cpp +++ b/examples/osgparticleeffects/osgparticleeffects.cpp @@ -340,10 +340,11 @@ public: itr!=parents.end(); ++itr) { - if (typeid(*(*itr))==typeid(osg::Group)) + osg::Group* parent = (*itr); + if (typeid(*parent)==typeid(osg::Group)) { ++numGroupsFound; - insertGroup = *itr; + insertGroup = parent; } } if (numGroupsFound==parents.size() && numGroupsFound==1 && insertGroup) diff --git a/examples/osgshadow/osgshadow.cpp b/examples/osgshadow/osgshadow.cpp index 52d2fda8a..23f8694db 100644 --- a/examples/osgshadow/osgshadow.cpp +++ b/examples/osgshadow/osgshadow.cpp @@ -479,8 +479,6 @@ namespace ModelTwo { osg::Vec3 center(0.0f,0.0f,0.0f); float radius = 100.0f; - osg::Vec3 lightPosition(center+osg::Vec3(0.0f,0.0f,radius)); - // the shadower model osg::Node* shadower = createMovingModel(center,radius*0.5f); shadower->setNodeMask(CastsShadowTraversalMask); diff --git a/examples/osgspotlight/osgspotlight.cpp b/examples/osgspotlight/osgspotlight.cpp index a81309465..5dc5fa24f 100644 --- a/examples/osgspotlight/osgspotlight.cpp +++ b/examples/osgspotlight/osgspotlight.cpp @@ -261,7 +261,6 @@ osg::Node* createModel() { osg::Vec3 center(0.0f,0.0f,0.0f); float radius = 100.0f; - osg::Vec3 lightPosition(center+osg::Vec3(0.0f,0.0f,radius)); // the shadower model osg::Node* shadower = createMovingModel(center,radius*0.5f); diff --git a/examples/osgwidgetnotebook/osgwidgetnotebook.cpp b/examples/osgwidgetnotebook/osgwidgetnotebook.cpp index 17a390f7a..362438fe1 100644 --- a/examples/osgwidgetnotebook/osgwidgetnotebook.cpp +++ b/examples/osgwidgetnotebook/osgwidgetnotebook.cpp @@ -14,7 +14,6 @@ #include const unsigned int MASK_2D = 0xF0000000; -const unsigned int MASK_3D = 0x0F000000; class Notebook: public osgWidget::Box { osg::ref_ptr _tabs; diff --git a/src/osg/glu/libutil/mipmap.cpp b/src/osg/glu/libutil/mipmap.cpp index 62232b808..87e328066 100644 --- a/src/osg/glu/libutil/mipmap.cpp +++ b/src/osg/glu/libutil/mipmap.cpp @@ -5557,13 +5557,11 @@ static void empty_image(const PixelStorageModes *psm, * Decimation of packed pixel types *-------------------------------------------------------------------------- */ -static void extract332(int isSwap, +static void extract332(int /*isSwap*/, const void *packedPixel, GLfloat extractComponents[]) { GLubyte ubyte= *(const GLubyte *)packedPixel; - isSwap= isSwap; /* turn off warnings */ - /* 11100000 == 0xe0 */ /* 00011100 == 0x1c */ /* 00000011 == 0x03 */ @@ -5593,13 +5591,11 @@ static void shove332(const GLfloat shoveComponents[], ((GLubyte)((shoveComponents[2] * 3)+0.5) ) & 0x03; } /* shove332() */ -static void extract233rev(int isSwap, +static void extract233rev(int /*isSwap*/, const void *packedPixel, GLfloat extractComponents[]) { GLubyte ubyte= *(const GLubyte *)packedPixel; - isSwap= isSwap; /* turn off warnings */ - /* 0000,0111 == 0x07 */ /* 0011,1000 == 0x38 */ /* 1100,0000 == 0xC0 */ @@ -8559,10 +8555,8 @@ GLint GLAPIENTRY gluBuild3DMipmaps(GLTexImage3DProc gluTexImage3D, data); } /* gluBuild3DMipmaps() */ -static GLdouble extractUbyte(int isSwap, const void *ubyte) +static GLdouble extractUbyte(int /*isSwap*/, const void *ubyte) { - isSwap= isSwap; /* turn off warnings */ - return (GLdouble)(*((const GLubyte *)ubyte)); } /* extractUbyte() */ @@ -8573,10 +8567,8 @@ static void shoveUbyte(GLdouble value, int index, void *data) ((GLubyte *)data)[index]= (GLubyte)value; } /* shoveUbyte() */ -static GLdouble extractSbyte(int isSwap, const void *sbyte) +static GLdouble extractSbyte(int /*isSwap*/, const void *sbyte) { - isSwap= isSwap; /* turn off warnings */ - return (GLdouble)(*((const GLbyte *)sbyte)); } /* extractSbyte() */ diff --git a/src/osgDB/ConvertBase64.cpp b/src/osgDB/ConvertBase64.cpp index cbd1ae62d..50befdf66 100644 --- a/src/osgDB/ConvertBase64.cpp +++ b/src/osgDB/ConvertBase64.cpp @@ -317,8 +317,9 @@ namespace osgDB } // Allocate memory for use with osg::Image - char* allocated_out = new char[stream_out.tellp()]; - memcpy(allocated_out, stream_out.str().c_str(), stream_out.tellp()); + const std::string str = stream_out.str(); + char* allocated_out = new char[str.size()]; + memcpy(allocated_out, str.c_str(), str.size()); return allocated_out; } diff --git a/src/osgPlugins/3ds/WriterNodeVisitor.cpp b/src/osgPlugins/3ds/WriterNodeVisitor.cpp index 7d760c8b8..dc62589a9 100644 --- a/src/osgPlugins/3ds/WriterNodeVisitor.cpp +++ b/src/osgPlugins/3ds/WriterNodeVisitor.cpp @@ -136,7 +136,6 @@ public: _listTriangles(listTriangles), _hasNormalCoords(geo->getNormalArray() != NULL), _hasTexCoords(geo->getTexCoordArray(0) != NULL), - _geo(geo), _lastFaceIndex(0), _material(material) { @@ -288,7 +287,6 @@ private: GLenum _modeCache; std::vector _indexCache; bool _hasNormalCoords, _hasTexCoords; - osg::Geometry* _geo; unsigned int _lastFaceIndex; unsigned int _material; }; diff --git a/src/osgPlugins/OpenFlight/FltExportVisitor.cpp b/src/osgPlugins/OpenFlight/FltExportVisitor.cpp index 7b7947083..04fecda4d 100644 --- a/src/osgPlugins/OpenFlight/FltExportVisitor.cpp +++ b/src/osgPlugins/OpenFlight/FltExportVisitor.cpp @@ -68,7 +68,7 @@ FltExportVisitor::FltExportVisitor( DataOutputStream* dos, _dos( *dos ), _materialPalette( new MaterialPaletteManager( *fltOpt ) ), _texturePalette( new TexturePaletteManager( *this, *fltOpt ) ), - _lightSourcePalette( new LightSourcePaletteManager( *fltOpt ) ), + _lightSourcePalette( new LightSourcePaletteManager( ) ), _vertexPalette( new VertexPaletteManager( *fltOpt ) ), _firstNode( true ) { diff --git a/src/osgPlugins/OpenFlight/LightSourcePaletteManager.cpp b/src/osgPlugins/OpenFlight/LightSourcePaletteManager.cpp index 6d4f3a9cd..0cf1571a2 100644 --- a/src/osgPlugins/OpenFlight/LightSourcePaletteManager.cpp +++ b/src/osgPlugins/OpenFlight/LightSourcePaletteManager.cpp @@ -28,10 +28,8 @@ namespace flt { -LightSourcePaletteManager::LightSourcePaletteManager( ExportOptions& fltOpt ) - : _currIndex( -1 ), - _fltOpt( fltOpt ) - +LightSourcePaletteManager::LightSourcePaletteManager() + : _currIndex( -1 ) { // TODO: Pay attention to the version here(?) } diff --git a/src/osgPlugins/OpenFlight/LightSourcePaletteManager.h b/src/osgPlugins/OpenFlight/LightSourcePaletteManager.h index 1e4fc767d..24f028ff8 100644 --- a/src/osgPlugins/OpenFlight/LightSourcePaletteManager.h +++ b/src/osgPlugins/OpenFlight/LightSourcePaletteManager.h @@ -36,7 +36,7 @@ class DataOutputStream; class LightSourcePaletteManager { public: - LightSourcePaletteManager( ExportOptions& fltOpt ); + LightSourcePaletteManager(); // Add a light to the palette and auto-assign it the next available index int add(osg::Light const* light); @@ -64,9 +64,6 @@ class LightSourcePaletteManager typedef std::map LightPalette; LightPalette _lightPalette; - - ExportOptions& _fltOpt; - protected: LightSourcePaletteManager& operator = (const LightSourcePaletteManager&) { return *this; } diff --git a/src/osgPlugins/OpenFlight/PrimaryRecords.cpp b/src/osgPlugins/OpenFlight/PrimaryRecords.cpp index 4c72d7f33..8e8594a7a 100644 --- a/src/osgPlugins/OpenFlight/PrimaryRecords.cpp +++ b/src/osgPlugins/OpenFlight/PrimaryRecords.cpp @@ -952,14 +952,15 @@ protected: if (_parent.valid()) { // LODs adds an empty child group so it is safe to remove this object record. - if (typeid(*_parent)==typeid(flt::LevelOfDetail)) + PrimaryRecord* parent = _parent.get(); + if (typeid(parent)==typeid(flt::LevelOfDetail)) return true; - if (typeid(*_parent)==typeid(flt::OldLevelOfDetail)) + if (typeid(parent)==typeid(flt::OldLevelOfDetail)) return true; // If parent is a Group record we have to check for animation. - Group* parentGroup = dynamic_cast(_parent.get()); + Group* parentGroup = dynamic_cast(parent); if (parentGroup && !parentGroup->hasAnimation()) return true; } diff --git a/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp b/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp index f46d17322..9aa1f4074 100644 --- a/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp +++ b/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp @@ -163,10 +163,10 @@ FltExportVisitor::writeHeader( const std::string& headerName ) // Group flags static const unsigned int FORWARD_ANIM = 0x80000000u >> 1; static const unsigned int SWING_ANIM = 0x80000000u >> 2; -static const unsigned int BOUND_BOX_FOLLOW = 0x80000000u >> 3; -static const unsigned int FREEZE_BOUND_BOX = 0x80000000u >> 4; -static const unsigned int DEFAULT_PARENT = 0x80000000u >> 5; -static const unsigned int BACKWARD_ANIM = 0x80000000u >> 6; +//static const unsigned int BOUND_BOX_FOLLOW = 0x80000000u >> 3; +//static const unsigned int FREEZE_BOUND_BOX = 0x80000000u >> 4; +//static const unsigned int DEFAULT_PARENT = 0x80000000u >> 5; +//static const unsigned int BACKWARD_ANIM = 0x80000000u >> 6; // @@ -402,8 +402,8 @@ FltExportVisitor::writeDegreeOfFreedom( const osgSim::DOFTransform* dof ) static const unsigned long COLOR_PALETTE_OVERRIDE = 0x80000000u >> 0; static const unsigned long MATERIAL_PALETTE_OVERRIDE = 0x80000000u >> 1; static const unsigned long TEXTURE_PALETTE_OVERRIDE = 0x80000000u >> 2; -static const unsigned long LINE_STYLE_PALETTE_OVERRIDE = 0x80000000u >> 3; -static const unsigned long SOUND_PALETTE_OVERRIDE = 0x80000000u >> 4; +//static const unsigned long LINE_STYLE_PALETTE_OVERRIDE = 0x80000000u >> 3; +//static const unsigned long SOUND_PALETTE_OVERRIDE = 0x80000000u >> 4; static const unsigned long LIGHT_SOURCE_PALETTE_OVERRIDE = 0x80000000u >> 5; static const unsigned long LIGHT_POINT_PALETTE_OVERRIDE = 0x80000000u >> 6; static const unsigned long SHADER_PALETTE_OVERRIDE = 0x80000000u >> 7; diff --git a/src/osgPlugins/freetype/FreeTypeLibrary.cpp b/src/osgPlugins/freetype/FreeTypeLibrary.cpp index 8f3481370..8651f2768 100644 --- a/src/osgPlugins/freetype/FreeTypeLibrary.cpp +++ b/src/osgPlugins/freetype/FreeTypeLibrary.cpp @@ -114,7 +114,7 @@ FT_Byte* FreeTypeLibrary::getFace(std::istream& fontstream, unsigned int index, std::streampos length = end - start; /* empty stream into memory, open that, and keep the pointer in a FreeTypeFont for cleanup */ - FT_Byte *buffer = new FT_Byte[length]; + FT_Byte *buffer = new FT_Byte[static_cast(length)]; fontstream.read(reinterpret_cast(buffer), length); if (!fontstream || (static_cast(fontstream.gcount()) != length)) { diff --git a/src/osgPlugins/osc/OscReceivingDevice.cpp b/src/osgPlugins/osc/OscReceivingDevice.cpp index b9c8045e9..4b6cbb73b 100644 --- a/src/osgPlugins/osc/OscReceivingDevice.cpp +++ b/src/osgPlugins/osc/OscReceivingDevice.cpp @@ -424,8 +424,6 @@ public: { out << getRequestPath() << "(int keycode): send KEY_DOWN and KEY_UP"; } -private: - bool _handleKeyPress; }; diff --git a/src/osgPlugins/osc/osc/OscHostEndianness.h b/src/osgPlugins/osc/osc/OscHostEndianness.h index 3720ea63f..fe135f46b 100644 --- a/src/osgPlugins/osc/osc/OscHostEndianness.h +++ b/src/osgPlugins/osc/osc/OscHostEndianness.h @@ -54,18 +54,26 @@ #if defined(__GLIBC__) || defined(__ANDROID__) || defined(__CYGWIN__) #include #if (__BYTE_ORDER == __LITTLE_ENDIAN) - #define __LITTLE_ENDIAN__ + #ifndef __LITTLE_ENDIAN__ + #define __LITTLE_ENDIAN__ + #endif #elif (__BYTE_ORDER == __BIG_ENDIAN) - #define __BIG_ENDIAN__ + #ifndef __BIG_ENDIAN__ + #define __BIG_ENDIAN__ + #endif #else #error Unknown machine endianness detected. #endif #elif defined(__FreeBSD__) #include #if (_BYTE_ORDER == _LITTLE_ENDIAN) - #define __LITTLE_ENDIAN__ + #ifndef __LITTLE_ENDIAN__ + #define __LITTLE_ENDIAN__ + #endif #elif (_BYTE_ORDER == _BIG_ENDIAN) - #define __BIG_ENDIAN__ + #ifndef __BIG_ENDIAN__ + #define __BIG_ENDIAN__ + #endif #else #error Unknown machine endianness detected. #endif diff --git a/src/osgPlugins/osga/OSGA_Archive.h b/src/osgPlugins/osga/OSGA_Archive.h index 43512723b..354c95037 100644 --- a/src/osgPlugins/osga/OSGA_Archive.h +++ b/src/osgPlugins/osga/OSGA_Archive.h @@ -94,8 +94,8 @@ class OSGA_Archive : public osgDB::Archive typedef __int64 pos_type; typedef __int64 size_type; #else - typedef unsigned long long pos_type; - typedef unsigned long long size_type; + typedef long long pos_type; + typedef long long size_type; #endif typedef std::pair PositionSizePair; diff --git a/src/osgShadow/ConvexPolyhedron.cpp b/src/osgShadow/ConvexPolyhedron.cpp index 403b3fafc..a261a4c30 100644 --- a/src/osgShadow/ConvexPolyhedron.cpp +++ b/src/osgShadow/ConvexPolyhedron.cpp @@ -77,9 +77,8 @@ using namespace osgShadow; const osg::Matrix & ConvexPolyhedron::defaultMatrix = *(osg::Matrix*)NULL; static const double epsi = pow( 2.0, -20.0 ); //circa 8 times float prec(~2^-23) static const double plane_hull_tolerance = 1.0e-5; -static const double point_plane_tolerance = 0; -static const double point_point_tolerance = 0; -static const double point_point_equivalence = 0; +static const double point_plane_tolerance = 0.0; +static const double point_point_equivalence = 0.; // Tim Moore modifications for GCC 4.3 August 15, 2008 // they correspond to Adrian Egli tweaks for VS 7.3 on August 19, 2008 diff --git a/src/osgShadow/DebugShadowMap.cpp b/src/osgShadow/DebugShadowMap.cpp index ea57a39bf..26f00ff19 100644 --- a/src/osgShadow/DebugShadowMap.cpp +++ b/src/osgShadow/DebugShadowMap.cpp @@ -225,7 +225,8 @@ void DebugShadowMap::ViewData::setDebugPolytope { if( !getDebugDraw() ) return; - if( &polytope == NULL ) { // delete + const ConvexPolyhedron* polytope_ptr = &polytope; + if( polytope_ptr == NULL ) { // delete PolytopeGeometry & pg = _polytopeGeometryMap[ std::string( name ) ]; for( unsigned int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ ) { diff --git a/src/osgShadow/OccluderGeometry.cpp b/src/osgShadow/OccluderGeometry.cpp index aac9f4f4f..9a5d3dc12 100644 --- a/src/osgShadow/OccluderGeometry.cpp +++ b/src/osgShadow/OccluderGeometry.cpp @@ -787,8 +787,6 @@ void OccluderGeometry::computeShadowVolumeGeometry(const osg::Vec4& lightpos, Sh UIntList silhouetteIndices; computeLightDirectionSilhouetteEdges(lightdirection, silhouetteIndices); - osg::Vec3 offset( lightdirection*5.0f ); - float directionScale = 1.0f / basePlane.dotProductNormal(lightdirection); for(UIntList::iterator itr = silhouetteIndices.begin(); diff --git a/src/osgShadow/ShadowMap.cpp b/src/osgShadow/ShadowMap.cpp index dbdbd9c7d..585a9a724 100644 --- a/src/osgShadow/ShadowMap.cpp +++ b/src/osgShadow/ShadowMap.cpp @@ -60,16 +60,6 @@ static const char fragmentShaderSource_withBaseTexture[] = ////////////////////////////////////////////////////////////////// // fragment shader // -static const char fragmentShaderSource_debugHUD_texcoord[] = - "uniform sampler2D osgShadow_shadowTexture; \n" - " \n" - "void main(void) \n" - "{ \n" - " vec4 texCoord = gl_TexCoord[1].xyzw; \n" - " float value = texCoord.z / texCoord.w; \n" - " gl_FragColor = vec4( value, value, value, 1.0 ); \n" - "} \n"; - static const char fragmentShaderSource_debugHUD[] = "uniform sampler2D osgShadow_shadowTexture; \n" " \n" diff --git a/src/osgSim/SphereSegment.cpp b/src/osgSim/SphereSegment.cpp index 4235c7608..17248d99d 100644 --- a/src/osgSim/SphereSegment.cpp +++ b/src/osgSim/SphereSegment.cpp @@ -893,7 +893,8 @@ struct ActivateTransparencyOnType void operator()(osg::ref_ptr& nptr) const { - if(typeid(*nptr)==_t) + const osg::Node* ptr = nptr.get(); + if(typeid(*ptr)==_t) { osg::Drawable* drawable = nptr->asDrawable(); osg::StateSet* ss = drawable->getOrCreateStateSet(); @@ -919,7 +920,8 @@ struct DeactivateTransparencyOnType void operator()(osg::ref_ptr& nptr) const { - if(typeid(*nptr)==_t) + const osg::Node* ptr = nptr.get(); + if(typeid(*ptr)==_t) { osg::Drawable* drawable = nptr->asDrawable(); osg::StateSet* ss = drawable->getOrCreateStateSet(); diff --git a/src/osgUtil/DelaunayTriangulator.cpp b/src/osgUtil/DelaunayTriangulator.cpp index 56a1ecc6f..b4539ebef 100644 --- a/src/osgUtil/DelaunayTriangulator.cpp +++ b/src/osgUtil/DelaunayTriangulator.cpp @@ -993,7 +993,7 @@ bool DelaunayTriangulator::triangulate() { e1=titr->c(); e2=titr->a(); } - else if (icut==3) + else { e1=titr->a(); e2=titr->b(); } diff --git a/src/osgUtil/Optimizer.cpp b/src/osgUtil/Optimizer.cpp index ecfef09b5..f12b0deb8 100644 --- a/src/osgUtil/Optimizer.cpp +++ b/src/osgUtil/Optimizer.cpp @@ -1563,11 +1563,12 @@ void Optimizer::CombineLODsVisitor::apply(osg::LOD& lod) { for(unsigned int i=0;iasGroup()); + _groupList.insert(parent->asGroup()); } } } diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index f757913ec..3ea078c13 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -50,24 +50,6 @@ static const GLubyte patternVertEven[] = { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}; -static const GLubyte patternVertOdd[] = { - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA}; - static const GLubyte patternHorzEven[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index b555e9201..a3a5b8173 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -1311,23 +1311,6 @@ static const GLubyte patternVertEven[] = { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}; -static const GLubyte patternVertOdd[] = { - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA}; static const GLubyte patternHorzEven[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, diff --git a/src/osgWrappers/deprecated-dotosg/osg/NodeCallback.cpp b/src/osgWrappers/deprecated-dotosg/osg/NodeCallback.cpp index 5644db54e..3a3e75d4c 100644 --- a/src/osgWrappers/deprecated-dotosg/osg/NodeCallback.cpp +++ b/src/osgWrappers/deprecated-dotosg/osg/NodeCallback.cpp @@ -23,15 +23,15 @@ REGISTER_DOTOSGWRAPPER(NodeCallback) bool NodeCallback_readLocalData(osg::Object &obj, osgDB::Input &fr) { - NodeCallback& nc = dynamic_cast(obj); - if (!(&nc)) return false; + NodeCallback* nc = dynamic_cast(&obj); + if (!nc) return false; bool itrAdvanced = false; NodeCallback* ncc = fr.readObjectOfType(); if (ncc) { - nc.setNestedCallback(ncc); + nc->setNestedCallback(ncc); itrAdvanced = true; }