diff --git a/applications/present3D/present3D.cpp b/applications/present3D/present3D.cpp index 82f22ca2a..701b615d0 100644 --- a/applications/present3D/present3D.cpp +++ b/applications/present3D/present3D.cpp @@ -636,11 +636,8 @@ int main( int argc, char **argv ) float width = osg::DisplaySettings::instance()->getScreenWidth(); float height = osg::DisplaySettings::instance()->getScreenHeight(); float distance = osg::DisplaySettings::instance()->getScreenDistance(); - bool sizesSpecified = false; while (arguments.read("-s", width, height, distance)) { - sizesSpecified = true; - osg::DisplaySettings::instance()->setScreenDistance(distance); osg::DisplaySettings::instance()->setScreenHeight(height); osg::DisplaySettings::instance()->setScreenWidth(width); diff --git a/examples/osgdistortion/osgdistortion.cpp b/examples/osgdistortion/osgdistortion.cpp index 55d119b86..ea26cf7bb 100644 --- a/examples/osgdistortion/osgdistortion.cpp +++ b/examples/osgdistortion/osgdistortion.cpp @@ -122,8 +122,6 @@ osg::Node* createDistortionSubgraph(osg::Node* subgraph, const osg::Vec4& clearC osg::Vec2 dx_texcoord(1.0f/(float)(noSteps-1),0.0f); osg::Vec2 dy_texcoord(0.0f,1.0f/(float)(noSteps-1)); - osg::Vec3 cursor = bottom; - osg::Vec2 texcoord = bottom_texcoord; int i,j; for(i=0;iaddCommandLineOption( "--finalsize ", "Size of the poster (Default: 6400 4800)." ); usage->addCommandLineOption( "--enable-output-poster", "Output the final poster file (Default)." ); usage->addCommandLineOption( "--disable-output-poster", "Don't output the final poster file." ); - usage->addCommandLineOption( "--enable-output-tiles", "Output all tile files." ); - usage->addCommandLineOption( "--disable-output-tiles", "Don't output all tile files (Default)." ); + //usage->addCommandLineOption( "--enable-output-tiles", "Output all tile files." ); + //usage->addCommandLineOption( "--disable-output-tiles", "Don't output all tile files (Default)." ); usage->addCommandLineOption( "--use-fb", "Use Frame Buffer for rendering tiles (Default, recommended)."); usage->addCommandLineOption( "--use-fbo", "Use Frame Buffer Object for rendering tiles."); usage->addCommandLineOption( "--use-pbuffer","Use Pixel Buffer for rendering tiles."); @@ -250,7 +250,8 @@ int main( int argc, char** argv ) // Poster arguments bool activeMode = true; - bool outputPoster = true, outputTiles = false; + bool outputPoster = true; + //bool outputTiles = false; int tileWidth = 640, tileHeight = 480; int posterWidth = 640*2, posterHeight = 480*2; std::string posterName = "poster.bmp", extName = "bmp"; @@ -265,8 +266,8 @@ int main( int argc, char** argv ) while ( arguments.read("--ext", extName) ) {} while ( arguments.read("--enable-output-poster") ) { outputPoster = true; } while ( arguments.read("--disable-output-poster") ) { outputPoster = false; } - while ( arguments.read("--enable-output-tiles") ) { outputTiles = true; } - while ( arguments.read("--disable-output-tiles") ) { outputTiles = false; } + //while ( arguments.read("--enable-output-tiles") ) { outputTiles = true; } + //while ( arguments.read("--disable-output-tiles") ) { outputTiles = false; } while ( arguments.read("--use-fbo")) { renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; } while ( arguments.read("--use-pbuffer")) { renderImplementation = osg::Camera::PIXEL_BUFFER; } while ( arguments.read("--use-pbuffer-rtt")) { renderImplementation = osg::Camera::PIXEL_BUFFER_RTT; } diff --git a/examples/osgtext3D/TextNode.cpp b/examples/osgtext3D/TextNode.cpp index 0cb774f71..8a19af9f5 100644 --- a/examples/osgtext3D/TextNode.cpp +++ b/examples/osgtext3D/TextNode.cpp @@ -77,13 +77,11 @@ void Layout::layout(TextNode& text) const } float characterWidthScale = 1.0f; - float characterHeightScale = 1.0f; bool textIs3D = (style && style->getThicknessRatio()!=0.0); if (!textIs3D) { characterWidthScale = 1.0f/static_cast(resolution.first); - characterHeightScale = 1.0f/static_cast(resolution.second); } osgText::KerningType kerningType = osgText::KERNING_DEFAULT; diff --git a/examples/osgthreadedterrain/osgthreadedterrain.cpp b/examples/osgthreadedterrain/osgthreadedterrain.cpp index 56613b290..c8e50925c 100644 --- a/examples/osgthreadedterrain/osgthreadedterrain.cpp +++ b/examples/osgthreadedterrain/osgthreadedterrain.cpp @@ -666,7 +666,6 @@ int main(int argc, char** argv) osg::Texture::FilterMode filter = osg::Texture::LINEAR; - bool readParameter = false; float minValue, maxValue; float scale = 1.0f; float offset = 0.0f; @@ -674,13 +673,11 @@ int main(int argc, char** argv) int pos = 1; while(possetCoordinateSystemType(osgTerrain::Locator::GEOCENTRIC); locator->setTransformAsExtents(x,y,x+w,y+h); - readParameter = true; } else if (arguments.read(pos, "--transform",offset, scale) || arguments.read(pos, "-t",offset, scale)) { // define the extents. - readParameter = true; } else if (arguments.read(pos, "--cartesian",x,y,w,h)) @@ -711,8 +706,6 @@ int main(int argc, char** argv) else if (arguments.read(pos, "--hf",filename)) { - readParameter = true; - osg::notify(osg::NOTICE)<<"--hf "< hf = osgDB::readHeightFieldFile(filename); @@ -748,7 +741,6 @@ int main(int argc, char** argv) else if (arguments.read(pos, "-d",filename) || arguments.read(pos, "--elevation-image",filename)) { - readParameter = true; osg::notify(osg::NOTICE)<<"--elevation-image "< image = osgDB::readImageFile(filename); @@ -783,7 +775,6 @@ int main(int argc, char** argv) else if (arguments.read(pos, "-c",filename) || arguments.read(pos, "--image",filename)) { - readParameter = true; osg::notify(osg::NOTICE)<<"--image "< tf = new osg::TransferFunction1D; unsigned int numCells = 6; diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index 498e548c6..946b958ff 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -533,11 +533,6 @@ int main( int argc, char **argv ) arguments.getApplicationUsage()->addCommandLineOption("--s_maxTextureSize ","Set the texture maximum resolution in the s (x) dimension."); arguments.getApplicationUsage()->addCommandLineOption("--t_maxTextureSize ","Set the texture maximum resolution in the t (y) dimension."); arguments.getApplicationUsage()->addCommandLineOption("--r_maxTextureSize ","Set the texture maximum resolution in the r (z) dimension."); - arguments.getApplicationUsage()->addCommandLineOption("--compressed","Enable the usage of compressed textures."); - arguments.getApplicationUsage()->addCommandLineOption("--compressed-arb","Enable the usage of OpenGL ARB compressed textures."); - arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt1","Enable the usage of S3TC DXT1 compressed textures."); - arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt3","Enable the usage of S3TC DXT3 compressed textures."); - arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt5","Enable the usage of S3TC DXT5 compressed textures."); arguments.getApplicationUsage()->addCommandLineOption("--modulate-alpha-by-luminance","For each pixel multiply the alpha value by the luminance."); arguments.getApplicationUsage()->addCommandLineOption("--replace-alpha-with-luminance","For each pixel set the alpha value to the luminance."); arguments.getApplicationUsage()->addCommandLineOption("--replace-rgb-with-luminance","For each rgb pixel convert to the luminance."); @@ -675,14 +670,6 @@ int main( int argc, char **argv ) while(arguments.read("--t_maxTextureSize",t_maximumTextureSize)) {} while(arguments.read("--r_maxTextureSize",r_maximumTextureSize)) {} - osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT; - while(arguments.read("--compressed") || arguments.read("--compressed-arb")) { internalFormatMode = osg::Texture::USE_ARB_COMPRESSION; } - - while(arguments.read("--compressed-dxt1")) { internalFormatMode = osg::Texture::USE_S3TC_DXT1_COMPRESSION; } - while(arguments.read("--compressed-dxt3")) { internalFormatMode = osg::Texture::USE_S3TC_DXT3_COMPRESSION; } - while(arguments.read("--compressed-dxt5")) { internalFormatMode = osg::Texture::USE_S3TC_DXT5_COMPRESSION; } - - // set up colour space operation. ColourSpaceOperation colourSpaceOperation = NO_COLOUR_SPACE_OPERATION; osg::Vec4 colourModulate(0.25f,0.25f,0.25f,0.25f); diff --git a/examples/osgwidgetcanvas/osgwidgetcanvas.cpp b/examples/osgwidgetcanvas/osgwidgetcanvas.cpp index da7abfd87..553266127 100644 --- a/examples/osgwidgetcanvas/osgwidgetcanvas.cpp +++ b/examples/osgwidgetcanvas/osgwidgetcanvas.cpp @@ -23,17 +23,15 @@ bool colorWidgetLeave(osgWidget::Event& event) { return true; } -bool windowMouseOver(osgWidget::Event& event) { - osgWidget::XYCoord xy = event.getWindow()->localXY(event.x, event.y); - +bool windowMouseOver(osgWidget::Event& /*event*/) { + //osgWidget::XYCoord xy = event.getWindow()->localXY(event.x, event.y); // osgWidget::warn() << "WINDOW " << xy.x() << " - " << xy.y() << std::endl; return true; } -bool widgetMouseOver(osgWidget::Event& event) { - osgWidget::XYCoord xy = event.getWidget()->localXY(event.x, event.y); - +bool widgetMouseOver(osgWidget::Event& /*event*/) { + // osgWidget::XYCoord xy = event.getWidget()->localXY(event.x, event.y); // osgWidget::warn() << "WIDGET mouseOver " << xy.x() << " - " << xy.y() << std::endl; return true; diff --git a/src/osg/ShapeDrawable.cpp b/src/osg/ShapeDrawable.cpp index e7d020bff..9129eb612 100644 --- a/src/osg/ShapeDrawable.cpp +++ b/src/osg/ShapeDrawable.cpp @@ -1406,8 +1406,6 @@ void PrimitiveShapeVisitor::createHalfSphere(unsigned int numSegments, unsigned float rBase=(top?(cosf(lBase)*radius):0.0f); float zBase=(top?(sinf(lBase)*radius):-radius); float vBase=(top?(vDelta*(numRows/2)):0.0f); - float nzBase=(top?(sinf(lBase)):-1.0f); - float nRatioBase=(top?(cosf(lBase)):0.0f); unsigned int rowbegin = top?numRows/2:0; unsigned int rowend = top?numRows:numRows/2; @@ -1419,8 +1417,6 @@ void PrimitiveShapeVisitor::createHalfSphere(unsigned int numSegments, unsigned float rTop = cosf(lTop)*radius; float zTop = sinf(lTop)*radius; float vTop = vBase+vDelta; - float nzTop= sinf(lTop); - float nRatioTop= cosf(lTop); _functor.begin(GL_QUAD_STRIP); @@ -1449,9 +1445,6 @@ void PrimitiveShapeVisitor::createHalfSphere(unsigned int numSegments, unsigned rBase=rTop; zBase=zTop; vBase=vTop; - nzBase=nzTop; - nRatioBase=nRatioTop; - } } diff --git a/src/osgGA/NodeTrackerManipulator.cpp b/src/osgGA/NodeTrackerManipulator.cpp index 077dd7ee6..03b881b6f 100644 --- a/src/osgGA/NodeTrackerManipulator.cpp +++ b/src/osgGA/NodeTrackerManipulator.cpp @@ -254,10 +254,7 @@ bool NodeTrackerManipulator::performMovementLeftMouseButton( const double eventT osg::Matrix rotation_matrix; rotation_matrix.makeRotate(_rotation); - osg::Vec3d lookVector = -getUpVector(rotation_matrix); osg::Vec3d sideVector = getSideVector(rotation_matrix); - osg::Vec3d upVector = getFrontVector(rotation_matrix); - osg::Vec3d localUp(0.0f,0.0f,1.0f); osg::Vec3d forwardVector = localUp^sideVector; diff --git a/src/osgGA/TerrainManipulator.cpp b/src/osgGA/TerrainManipulator.cpp index eab41e989..3912423f4 100644 --- a/src/osgGA/TerrainManipulator.cpp +++ b/src/osgGA/TerrainManipulator.cpp @@ -214,9 +214,7 @@ bool TerrainManipulator::performMovementMiddleMouseButton( const double eventTim // compute look vector. - Vec3d lookVector = -getUpVector(rotation_matrix); Vec3d sideVector = getSideVector(rotation_matrix); - Vec3d upVector = getFrontVector(rotation_matrix); // CoordinateFrame coordinateFrame = getCoordinateFrame(_center); // Vec3d localUp = getUpVector(coordinateFrame); diff --git a/src/osgParticle/FluidProgram.cpp b/src/osgParticle/FluidProgram.cpp index bc9bc85c0..63cec8624 100644 --- a/src/osgParticle/FluidProgram.cpp +++ b/src/osgParticle/FluidProgram.cpp @@ -35,7 +35,6 @@ void osgParticle::FluidProgram::execute(double dt) osg::Vec3 accel_gravity = _acceleration * ((particle->getMass() - _density*Volume) * particle->getMassInv()); // compute force due to friction - osg::Vec3 velBefore = particle->getVelocity(); osg::Vec3 relative_wind = particle->getVelocity()-_wind; osg::Vec3 wind_force = - relative_wind * Area * (_viscosityCoefficient + _densityCoefficient*relative_wind.length()); osg::Vec3 wind_accel = wind_force * particle->getMassInv(); diff --git a/src/osgPlugins/Inventor/ConvertToInventor.cpp b/src/osgPlugins/Inventor/ConvertToInventor.cpp index 9fe774773..2872e141f 100644 --- a/src/osgPlugins/Inventor/ConvertToInventor.cpp +++ b/src/osgPlugins/Inventor/ConvertToInventor.cpp @@ -1653,6 +1653,10 @@ void ConvertToInventor::processGeometry(const osg::Geometry *g, InventorState *i startIndex, stopIndex, normalIndex, colorIndex, coords, normals, ivMaterial, texCoords, ivState->ivTexture, shape, indexedRoot, nonIndexedRoot); + if (!ok) + { + OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<ivTexture, shape, indexedRoot, nonIndexedRoot); + if (!ok) + { + OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<getNumElements(), normalIndex, colorIndex, coords, normals, ivMaterial, texCoords, ivState->ivTexture, shape, indexedRoot, nonIndexedRoot); + if (!ok) + { + OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<= VERSION_15_1 /*int textureMappingIndex =*/ in.readInt16(-1); in.forward(2); @@ -939,7 +939,7 @@ protected: _lightMode = in.readUInt8(FACE_COLOR); in.forward(7); osg::Vec4 primaryPackedColor = in.readColor32(); - osg::Vec4 secondaryPackedColor = in.readColor32(); + /*osg::Vec4 secondaryPackedColor =*/ in.readColor32(); // version >= VERSION_15_1 /*int textureMappingIndex =*/ in.readInt16(-1); in.forward(2); diff --git a/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp b/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp index 3f67d6ab0..5cb3b76bb 100644 --- a/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp +++ b/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp @@ -423,9 +423,6 @@ class FLTReaderWriter : public ReaderWriter { // The continuation record complicates things a bit. - // Get current read position in stream. - std::istream::pos_type pos = fin.tellg(); - // get opcode and size flt::DataInputStream dataStream(fin.rdbuf()); opcode_type opcode = (opcode_type)dataStream.readUInt16(); diff --git a/src/osgPlugins/ac/Geode.cpp b/src/osgPlugins/ac/Geode.cpp index 5a1953391..6e308bdbe 100644 --- a/src/osgPlugins/ac/Geode.cpp +++ b/src/osgPlugins/ac/Geode.cpp @@ -929,27 +929,21 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) const osg::PrimitiveSet* primitiveset = pItr->get(); GLenum mode=primitiveset->getMode(); - unsigned int primLength; unsigned int surfaceFlags = 0x00; switch(mode) { case(osg::PrimitiveSet::POINTS): - primLength = 1; surfaceFlags = 0x02; break; case(osg::PrimitiveSet::LINES): - primLength = 2; surfaceFlags = 0x02; break; case(osg::PrimitiveSet::TRIANGLES): - primLength = 3; break; case(osg::PrimitiveSet::QUADS): - primLength = 4; break; default: - primLength = 0; break; // compute later when =0. } @@ -1027,25 +1021,6 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) default: break; // unknown shape } - /* const osg::DrawArrayLengths* drawArrayLengths = static_cast(primitiveset); - unsigned int vindex = drawArrayLengths->getFirst(); - for(osg::DrawArrayLengths::const_iterator primItr = drawArrayLengths->begin(); primItr !=drawArrayLengths->end(); ++primItr) - { - unsigned int localPrimLength; - if (primLength == 0) localPrimLength = *primItr; - else localPrimLength = primLength; - - for(GLsizei primCount = 0; primCount < *primItr; ++primCount) - { - if ((primCount%localPrimLength)==0) - { - OutputSurfHead(iCurrentMaterial,surfaceFlags,localPrimLength, fout); - } - OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout); - ++vindex; - } - - }*/ break; } case(osg::PrimitiveSet::DrawElementsUBytePrimitiveType): @@ -1074,24 +1049,6 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) default: break; // unknown shape } -/* if (primLength == 0) - primLength = primitiveset->getNumIndices(); - - const osg::DrawElementsUByte* drawElements = static_cast(primitiveset); - - unsigned int primCount = 0; - for(osg::DrawElementsUByte::const_iterator primItr=drawElements->begin(); primItr!=drawElements->end(); ++primCount,++primItr) - { - - if ((primCount%primLength) == 0) - { - OutputSurfHead(iCurrentMaterial,surfaceFlags,primLength, fout); - } - - unsigned int vindex=*primItr; - OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout); - } - */ break; } diff --git a/src/osgPlugins/cfg/ConfigParser.cpp b/src/osgPlugins/cfg/ConfigParser.cpp index fc6d6bb76..53751b564 100644 --- a/src/osgPlugins/cfg/ConfigParser.cpp +++ b/src/osgPlugins/cfg/ConfigParser.cpp @@ -225,6 +225,7 @@ #include #include +#include #include #include "FlexLexer.h" @@ -2245,6 +2246,11 @@ bool CameraConfig::parseFile( const std::string &file ) int pd[2]; int result = pipe( pd ); + if (result<0) + { + fprintf( stderr, "CameraConfig::parseFile() - pipe() failed, errno= \"%d\".\n", errno); + return false; + } flexer = new yyFlexLexer; if( fork() == 0 ) @@ -2252,7 +2258,12 @@ bool CameraConfig::parseFile( const std::string &file ) // we don't want to read from the pipe in the child, so close it. close( pd[0] ); close( 1 ); - result = dup( pd[1] ); + int result = dup( pd[1] ); + if (result<0) + { + fprintf( stderr, "CameraConfig::parseFile() - dup() failed, errno= \"%d\".\n", errno); + return false; + } /* This was here to allow reading a config file from stdin. @@ -2270,7 +2281,12 @@ bool CameraConfig::parseFile( const std::string &file ) { close( pd[1]); close( 0 ); - result = dup( pd[0] ); + int result = dup( pd[0] ); + if (result<0) + { + fprintf( stderr, "CameraConfig::parseFile() - dup() failed, errno= \"%d\".\n", errno); + return false; + } cfg = this; diff --git a/src/osgPlugins/dds/ReaderWriterDDS.cpp b/src/osgPlugins/dds/ReaderWriterDDS.cpp index a2b513cc2..5a459eb20 100644 --- a/src/osgPlugins/dds/ReaderWriterDDS.cpp +++ b/src/osgPlugins/dds/ReaderWriterDDS.cpp @@ -311,13 +311,11 @@ osg::Image* ReadDDSFile(std::istream& _istream) return NULL; } - bool is3dImage = false; int depth = 1; // Check for volume image if( ddsd.dwDepth > 0 && (ddsd.dwFlags & DDSD_DEPTH)) { - is3dImage = true; depth = ddsd.dwDepth; } @@ -718,7 +716,6 @@ bool WriteDDSFile(const osg::Image *img, std::ostream& fout) //unsigned int components = osg::Image::computeNumComponents(pixelFormat); unsigned int pixelSize = osg::Image::computePixelSizeInBits(pixelFormat, dataType); unsigned int imageSize = img->getImageSizeInBytes(); - bool is3dImage = false; ddsd.dwWidth = img->s(); ddsd.dwHeight = img->t(); @@ -726,7 +723,6 @@ bool WriteDDSFile(const osg::Image *img, std::ostream& fout) if(r > 1) /* check for 3d image */ { - is3dImage = true; ddsd.dwDepth = r; SD_flags |= DDSD_DEPTH; CAPS_flags |= DDSCAPS_COMPLEX; diff --git a/src/osgPlugins/hdr/hdrloader.cpp b/src/osgPlugins/hdr/hdrloader.cpp index 220b0bacd..d08f65cf0 100644 --- a/src/osgPlugins/hdr/hdrloader.cpp +++ b/src/osgPlugins/hdr/hdrloader.cpp @@ -98,7 +98,7 @@ bool HDRLoader::load(const char *_fileName, const bool _rawRGBE, HDRLoaderResult } fseek(file, 1, SEEK_CUR); - char cmd[2000]; + //char cmd[2000]; i = 0; char c = 0, oldc; while(true) { @@ -106,7 +106,7 @@ bool HDRLoader::load(const char *_fileName, const bool _rawRGBE, HDRLoaderResult c = fgetc(file); if (c == 0xa && oldc == 0xa) break; - cmd[i++] = c; + //cmd[i++] = c; } char reso[2000]; diff --git a/src/osgPlugins/ive/ShapeAttributeList.cpp b/src/osgPlugins/ive/ShapeAttributeList.cpp index 9c09e014c..9da79febf 100644 --- a/src/osgPlugins/ive/ShapeAttributeList.cpp +++ b/src/osgPlugins/ive/ShapeAttributeList.cpp @@ -28,7 +28,6 @@ void ShapeAttributeList::write(DataOutputStream* out) out->writeUInt(size()); // Write elements of the list - osgSim::ShapeAttributeList::const_iterator it = begin(); for (const_iterator it = begin(); it != end(); it++) { write(out, *it); diff --git a/src/osgPlugins/jp2/ReaderWriterJP2.cpp b/src/osgPlugins/jp2/ReaderWriterJP2.cpp index 8728a4423..1fe658fa5 100644 --- a/src/osgPlugins/jp2/ReaderWriterJP2.cpp +++ b/src/osgPlugins/jp2/ReaderWriterJP2.cpp @@ -38,7 +38,6 @@ extern "C" { jas_matrix_t *data[4]; jas_seqent_t *d[4]; jas_seqent_t v; - int linelen; int width, height; width = jas_image_cmptwidth(image, 0); @@ -64,7 +63,6 @@ extern "C" { } d[cmptno] = jas_matrix_getref(data[cmptno], 0, 0); } - linelen = 0; for (x = 0; x < width; ++x) { for (cmptno = 0; cmptno < numcmpts; ++cmptno) { v = *d[cmptno]; diff --git a/src/osgPlugins/p3d/ReaderWriterP3D.cpp b/src/osgPlugins/p3d/ReaderWriterP3D.cpp index a01282f56..92de70c2e 100644 --- a/src/osgPlugins/p3d/ReaderWriterP3D.cpp +++ b/src/osgPlugins/p3d/ReaderWriterP3D.cpp @@ -2118,8 +2118,6 @@ osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode* root, bool readOnly osgDB::FilePathList previousPaths = osgDB::getDataFilePathList(); - bool readSlide = false; - for(osgDB::XmlNode::Children::iterator itr = root->children.begin(); itr != root->children.end(); ++itr) @@ -2242,13 +2240,11 @@ osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode* root, bool readOnly } else if (readOnlyHoldingPage && cur->name == "holding_slide") { - readSlide = true; constructor.addSlide(); parseSlide (constructor, cur); } else if (!readOnlyHoldingPage && cur->name == "slide") { - readSlide = true; constructor.addSlide(); std::string inherit; @@ -2266,7 +2262,6 @@ osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode* root, bool readOnly } else if (!readOnlyHoldingPage && cur->name == "modify_slide") { - readSlide = true; int slideNum; if (getProperty(cur, "slide", slideNum)) { @@ -2280,17 +2275,14 @@ osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode* root, bool readOnly } else if (!readOnlyHoldingPage && cur->name == "page") { - readSlide = true; parsePage (constructor, cur); } else if (!readOnlyHoldingPage && cur->name == "pdf_document") { - readSlide = true; parsePdfDocument(constructor, cur); } else if (!readOnlyHoldingPage && cur->name == "template_slide") { - readSlide = true; std::string name; if (getProperty(cur, "name", name)) { diff --git a/src/osgPlugins/pvr/ReaderWriterPVR.cpp b/src/osgPlugins/pvr/ReaderWriterPVR.cpp index 304825251..d39a153a3 100644 --- a/src/osgPlugins/pvr/ReaderWriterPVR.cpp +++ b/src/osgPlugins/pvr/ReaderWriterPVR.cpp @@ -152,7 +152,6 @@ public: uint32_t formatFlags = header.flags & PVR_TEXTURE_FLAG_TYPE_MASK; GLenum internalFormat = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; uint32_t width, height; - bool hasAlpha; if(formatFlags == kPVRTextureFlagTypePVRTC_4 || formatFlags == kPVRTextureFlagTypePVRTC_2 || formatFlags == kPVRTextureFlagTypeOGLPVRTC_4 || formatFlags == kPVRTextureFlagTypeOGLPVRTC_2 || @@ -166,12 +165,7 @@ public: width = header.width; height = header.height; - - if(header.bitmaskAlpha) - hasAlpha = true; - else - hasAlpha = false; - + osg::ref_ptr image = new osg::Image; if (!image) return ReadResult::INSUFFICIENT_MEMORY_TO_LOAD; diff --git a/src/osgPlugins/txp/trpage_geom.cpp b/src/osgPlugins/txp/trpage_geom.cpp index 11e86e3b8..72b84cb16 100644 --- a/src/osgPlugins/txp/trpage_geom.cpp +++ b/src/osgPlugins/txp/trpage_geom.cpp @@ -611,10 +611,6 @@ bool trpgGeometry::Write(trpgWriteBuffer &buf) for (j=0;j<(unsigned int)num*2;j++) buf.Add(td.doubleData[j]); buf.End(); - - float u; - for (j=0;j<(unsigned int)num*2;j++) - u = (float)td.doubleData[j]; } } diff --git a/src/osgPlugins/txp/trpage_material.cpp b/src/osgPlugins/txp/trpage_material.cpp index 4be3c0060..6e1b368bb 100644 --- a/src/osgPlugins/txp/trpage_material.cpp +++ b/src/osgPlugins/txp/trpage_material.cpp @@ -100,7 +100,7 @@ int trpgMatTable::AddMaterial(const trpgMaterial &mat,bool lookForExisting) if (cmat.shadeModel>100) cmat.shadeModel=trpgMaterial::Smooth; int baseMat=0; - bool spaceInTable=false; + //bool spaceInTable=false; //int offset=baseMat; if (lookForExisting) { @@ -112,7 +112,7 @@ int trpgMatTable::AddMaterial(const trpgMaterial &mat,bool lookForExisting) const trpgMaterial &bm = itr->second; if (bm.shadeModel==999) { // this is an 'empty' entry. Means we won't find it, either. - spaceInTable=true; + //spaceInTable=true; break; } diff --git a/src/osgPlugins/txp/trpage_rarchive.cpp b/src/osgPlugins/txp/trpage_rarchive.cpp index 96856267c..324615e36 100644 --- a/src/osgPlugins/txp/trpage_rarchive.cpp +++ b/src/osgPlugins/txp/trpage_rarchive.cpp @@ -258,13 +258,9 @@ bool trpgr_Archive::ReadHeader(bool readAllBlocks) if(header.GetIsMaster()) { // bool firstBlock = true; - bool headerHasTexTable = false; //if the master has textures, we want to use them instead of the tables in the //block archives - int numTex = 0; - texTable.GetNumTextures(numTex); - if(numTex) - headerHasTexTable = true; + // int numTiles = 0; //tileTable. int totalrows,totalcols; diff --git a/src/osgPlugins/vtf/ReaderWriterVTF.cpp b/src/osgPlugins/vtf/ReaderWriterVTF.cpp index 6f4298027..078dca025 100644 --- a/src/osgPlugins/vtf/ReaderWriterVTF.cpp +++ b/src/osgPlugins/vtf/ReaderWriterVTF.cpp @@ -357,7 +357,6 @@ osg::Image* ReadVTFFile(std::istream& _istream) int s, t, r; unsigned int lrSize; unsigned char * imageData; - unsigned int base; unsigned int size; int mip; int mipSize; @@ -498,7 +497,7 @@ osg::Image* ReadVTFFile(std::istream& _istream) } // Compute the base position of the high-res image data - base = vtf_header.header_size + lrSize; + // unsigned int base = vtf_header.header_size + lrSize; // Now, get the internal format, pixel format, and data type from the // full-size image format, and check whether the format is supported diff --git a/src/osgPlugins/zip/ZipArchive.cpp b/src/osgPlugins/zip/ZipArchive.cpp index 8a79cbe02..4de8d6899 100644 --- a/src/osgPlugins/zip/ZipArchive.cpp +++ b/src/osgPlugins/zip/ZipArchive.cpp @@ -88,7 +88,6 @@ bool ZipArchive::getFileNames(osgDB::Archive::FileNameList& fileNameList) const if(mZipLoaded) { ZipEntryMap::const_iterator iter = mZipIndex.begin(); - ZipEntryMap::const_iterator iterEnd = mZipIndex.end(); for(;iter != mZipIndex.end(); ++iter) { diff --git a/src/osgPlugins/zip/unzip.cpp b/src/osgPlugins/zip/unzip.cpp index dd5526851..b464924f6 100644 --- a/src/osgPlugins/zip/unzip.cpp +++ b/src/osgPlugins/zip/unzip.cpp @@ -4042,8 +4042,6 @@ ZRESULT TUnzip::Get(int index,ZIPENTRY *ze) _tcsncpy_s(ze->name,MAX_PATH, sfn,MAX_PATH); #endif - - unsigned long a = ufi.external_fa; // zip has an 'attribute' 32bit value. Its lower half is windows stuff // its upper half is standard unix stat.st_mode. We'll start trying @@ -4052,15 +4050,11 @@ ZRESULT TUnzip::Get(int index,ZIPENTRY *ze) bool readonly= (a&0x00800000)==0; //bool readable= (a&0x01000000)!=0; // unused //bool executable=(a&0x00400000)!=0; // unused - bool hidden=false, system=false, archive=true; // but in normal hostmodes these are overridden by the lower half... int host = ufi.version>>8; if (host==0 || host==7 || host==11 || host==14) { readonly= (a&0x00000001)!=0; - hidden= (a&0x00000002)!=0; - system= (a&0x00000004)!=0; isdir= (a&0x00000010)!=0; - archive= (a&0x00000020)!=0; } // readonly; hidden; system; isdir; archive; ze->attr=0; @@ -4069,10 +4063,18 @@ ZRESULT TUnzip::Get(int index,ZIPENTRY *ze) if (isdir) ze->attr |= S_IFDIR; if (readonly) ze->attr &= ~S_IWUSR; #else + bool hidden=false, system=false, archive=true; + if (host==0 || host==7 || host==11 || host==14) + { + hidden= (a&0x00000002)!=0; + system= (a&0x00000004)!=0; + archive= (a&0x00000020)!=0; + } + if (isdir) ze->attr |= FILE_ATTRIBUTE_DIRECTORY; + if (readonly) ze->attr|=FILE_ATTRIBUTE_READONLY; if (archive) ze->attr|=FILE_ATTRIBUTE_ARCHIVE; if (hidden) ze->attr|=FILE_ATTRIBUTE_HIDDEN; - if (readonly) ze->attr|=FILE_ATTRIBUTE_READONLY; if (system) ze->attr|=FILE_ATTRIBUTE_SYSTEM; #endif ze->comp_size = ufi.compressed_size; diff --git a/src/osgQt/QGraphicsViewAdapter.cpp b/src/osgQt/QGraphicsViewAdapter.cpp index b52585f8c..c4069d9dd 100644 --- a/src/osgQt/QGraphicsViewAdapter.cpp +++ b/src/osgQt/QGraphicsViewAdapter.cpp @@ -341,10 +341,7 @@ bool QGraphicsViewAdapter::handlePointerEvent(int x, int y, int buttonMask) (middleButtonPressed ? Qt::MidButton : Qt::NoButton) | (rightButtonPressed ? Qt::RightButton : Qt::NoButton); - const QRect viewportGeometry = _graphicsView->viewport()->geometry(); const QPoint globalPos(x, y); - - if (buttonMask != _previousButtonMask) { diff --git a/src/osgShadow/ParallelSplitShadowMap.cpp b/src/osgShadow/ParallelSplitShadowMap.cpp index d7debe94a..73833b8bf 100644 --- a/src/osgShadow/ParallelSplitShadowMap.cpp +++ b/src/osgShadow/ParallelSplitShadowMap.cpp @@ -590,7 +590,7 @@ void ParallelSplitShadowMap::cull(osgUtil::CullVisitor& cv){ osg::ComputeBoundsVisitor cbbv(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN); cbbv.setTraversalMask(getShadowedScene()->getCastsShadowTraversalMask()); _shadowedScene->osg::Group::traverse(cbbv); - osg::BoundingBox bb = cbbv.getBoundingBox(); + ////////////////////////////////////////////////////////////////////////// const osg::Light* selectLight = 0; diff --git a/src/osgTerrain/GeometryTechnique.cpp b/src/osgTerrain/GeometryTechnique.cpp index 90469c75d..651ead8b0 100644 --- a/src/osgTerrain/GeometryTechnique.cpp +++ b/src/osgTerrain/GeometryTechnique.cpp @@ -774,9 +774,6 @@ void GeometryTechnique::generateGeometry(BufferData& buffer, Locator* masterLoca float sampleRatio = terrain ? terrain->getSampleRatio() : 1.0f; - double i_sampleFactor = 1.0; - double j_sampleFactor = 1.0; - // OSG_NOTICE<<"Sample ratio="<0.0f; @@ -89,7 +87,6 @@ struct FadeTextPolytopeData : public FadeTextData, public osg::Polytope OSG_NOTICE<<" normalFrontFace = "<