Warning fixes for:
OpenSceneGraph/src/osgPlugins/Inventor/ConvertFromInventor.cpp: In member function ?virtual SbBool SoVRMLImageTextureOsg::readInstance(SoInput*, short unsigned int)?: OpenSceneGraph/src/osgPlugins/Inventor/ConvertFromInventor.cpp:1264:16: warning: variable ?retval? set but not used [-Wunused-but-set-variable] OpenSceneGraph/src/osgPlugins/ac/Geode.cpp: In member function ?void ac3d::Geode::ProcessGeometry(std::ostream&, unsigned int)?: OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:806:35: warning: variable ?fRep_s? set but not used [-Wunused-but-set-variable] OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:806:43: warning: variable ?fRep_t? set but not used [-Wunused-but-set-variable] OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:807:35: warning: variable ?fOffset_s? set but not used [-Wunused-but-set-variable] OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:807:46: warning: variable ?fOffset_t? set but not used [-Wunused-but-set-variable] OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp: In member function ?virtual void osgViewer::GraphicsWindowX11::checkEvents()?: OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp:1181:10: warning: variable ?destroyWindowRequested? set but not used [-Wunused-but-set-variable]
This commit is contained in:
@@ -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<osg::Image> 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);
|
||||
|
||||
@@ -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<float>::max();
|
||||
fMax = std::numeric_limits<float>::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;
|
||||
|
||||
@@ -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"<<std::endl;
|
||||
@@ -1220,7 +1218,6 @@ void GraphicsWindowX11::checkEvents()
|
||||
{
|
||||
OSG_NOTICE<<"DeleteWindow event received"<<std::endl;
|
||||
// FIXME only do if _ownsWindow ?
|
||||
destroyWindowRequested = true;
|
||||
getEventQueue()->closeWindow(eventTime);
|
||||
}
|
||||
break;
|
||||
@@ -1551,13 +1548,6 @@ void GraphicsWindowX11::checkEvents()
|
||||
requestRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (destroyWindowRequested)
|
||||
{
|
||||
close();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void GraphicsWindowX11::grabFocus()
|
||||
|
||||
Reference in New Issue
Block a user