diff --git a/src/osgGL2/ProgramObject.cpp b/src/osgGL2/ProgramObject.cpp index 2eef6dbdf..bd87d26e8 100644 --- a/src/osgGL2/ProgramObject.cpp +++ b/src/osgGL2/ProgramObject.cpp @@ -232,7 +232,13 @@ void ProgramObject::dirtyShaderObjects() void ProgramObject::releaseGLObjects(osg::State* state) const { - const_cast(this)->dirtyShaderObjects(); + + if (!state) const_cast(this)->dirtyShaderObjects(); + else + { + unsigned int contextID = state->getContextID(); + const_cast(this)->_shaderObjectList[contextID]->dirtyShaderObject(); + } } diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index 3177982a5..efbe9cb04 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -1284,7 +1284,7 @@ osg::Group* ConvertFromFLT::visitObject(osg::Group& osgParent, ObjectRecord* rec std::string desc("flt object flags: 0x"); char cflags[33]; - sprintf( cflags, "%X", pSObject->dwFlags ); + sprintf( cflags, "%X", (unsigned int)pSObject->dwFlags ); desc = desc + cflags; object->getDescriptions().push_back( desc ); diff --git a/src/osgPlugins/txp/TXPParser.cpp b/src/osgPlugins/txp/TXPParser.cpp index 100542651..8fa43d45e 100644 --- a/src/osgPlugins/txp/TXPParser.cpp +++ b/src/osgPlugins/txp/TXPParser.cpp @@ -921,6 +921,8 @@ void* labelRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf) _parse->getCurrTop()->addChild(group); } break; + default: + break; } const std::vector *supports = label.GetSupports();