diff --git a/src/osgPlugins/Inventor/ConvertFromInventor.cpp b/src/osgPlugins/Inventor/ConvertFromInventor.cpp index fef8683d8..b98d0d12a 100644 --- a/src/osgPlugins/Inventor/ConvertFromInventor.cpp +++ b/src/osgPlugins/Inventor/ConvertFromInventor.cpp @@ -1261,10 +1261,9 @@ SbBool SoVRMLImageTextureOsg::readInstance(SoInput *in, unsigned short flags) // create options and read the file osgDB::ReaderWriter::Options *options = createOptions(); - SbBool retval = TRUE; - if (url.getNum() && url[0].getLength()) { + if (url.getNum() && url[0].getLength()) + { osg::ref_ptr image = loadImage(url[0].getString(), options); - retval = image->valid(); if (!image->valid()) { OSG_WARN << "Could not read texture file: " << url[0].getString() << std::endl; @@ -1288,8 +1287,6 @@ SbBool SoVRMLImageTextureOsg::readInstance(SoInput *in, unsigned short flags) // We can safely ignore this as we are not going to render the scene graph. } } - else - retval = TRUE; } url.enableNotify(oldNotify); diff --git a/src/osgPlugins/ac/Geode.cpp b/src/osgPlugins/ac/Geode.cpp index 6e308bdbe..c6decb34f 100644 --- a/src/osgPlugins/ac/Geode.cpp +++ b/src/osgPlugins/ac/Geode.cpp @@ -803,9 +803,6 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) // assert(NULL != pTexture2D); if (NULL != pTexture2D) { - float fRep_s, fRep_t; - float fOffset_s, fOffset_t; - pTexCoords = (const osg::Vec2*)pGeometry->getTexCoordArray(0)->getDataPointer(); // OK now see if I can calcualate the repeats @@ -828,8 +825,6 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) if (pTexCoords[j][0] < fMin) fMin = pTexCoords[j][0]; } - fRep_s = fMax - fMin; - fOffset_s = fMin; fMin = std::numeric_limits::max(); fMax = std::numeric_limits::min(); for (j = 0; j < iNumTexCoords; j++) @@ -839,24 +834,9 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) if (pTexCoords[j][1] < fMin) fMin = pTexCoords[j][1]; } - fRep_t = fMax - fMin; - fOffset_t = fMin; - } - else - { - fRep_s = 1.0; - fOffset_s = 0.0; - fRep_t = 1.0; - fOffset_t = 0.0; } } - else - { - fRep_s = 1.0; - fOffset_s = 0.0; - fRep_t = 1.0; - fOffset_t = 0.0; - } + { // replace back slash with / for ac3d convention GWM Sep 2003 std::string fname=pTexture2D->getImage()->getFileName(); unsigned int pos; @@ -865,8 +845,6 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) } fout << "texture \"" << fname << "\"" << std::endl; } -// fout << "texrep " << fRep_s << " " << fRep_t << std::endl; -// fout << "texoff " << fOffset_s << " " << fOffset_s << std::endl; // Temp frig fout << "texrep 1 1" << std::endl; fout << "texoff 0 0" << std::endl; diff --git a/src/osgViewer/GraphicsWindowX11.cpp b/src/osgViewer/GraphicsWindowX11.cpp index e5982fbc9..03f7ce4d8 100644 --- a/src/osgViewer/GraphicsWindowX11.cpp +++ b/src/osgViewer/GraphicsWindowX11.cpp @@ -903,7 +903,7 @@ bool GraphicsWindowX11::createWindow() doFullSceenWorkAround = true; } } - + _window = XCreateWindow( _display, _parent, x, y, @@ -1201,8 +1201,6 @@ void GraphicsWindowX11::checkEvents() int windowWidth = _traits->width; int windowHeight = _traits->height; - bool destroyWindowRequested = false; - Time firstEventTime = 0; // OSG_NOTICE<<"Check events"<closeWindow(eventTime); } break; @@ -1551,13 +1548,6 @@ void GraphicsWindowX11::checkEvents() requestRedraw(); } } - -#if 0 - if (destroyWindowRequested) - { - close(); - } -#endif } void GraphicsWindowX11::grabFocus()