diff --git a/examples/osgfpdepth/osgfpdepth.cpp b/examples/osgfpdepth/osgfpdepth.cpp index 4eabc6e6f..86541bc30 100644 --- a/examples/osgfpdepth/osgfpdepth.cpp +++ b/examples/osgfpdepth/osgfpdepth.cpp @@ -156,7 +156,7 @@ void getPossibleConfigs(GraphicsContext* gc, BufferConfigList& colorConfigs, bool checkFramebufferStatus(GraphicsContext* gc, bool silent = false) { State& state = *gc->getState(); - osg::GLExtensions* ext = gc->getState()->get(); + osg::GLExtensions* ext = state.get(); switch(ext->glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT)) { case GL_FRAMEBUFFER_COMPLETE_EXT: break; diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 8d36059d6..c4f6b2db1 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -1847,14 +1847,14 @@ std::string State::getDefineString(const osg::ShaderDefines& shaderDefines) const StateSet::DefinePair& dp = cd_itr->second; shaderDefineStr += "#define "; shaderDefineStr += cd_itr->first; - if (cd_itr->second.first.empty()) + if (dp.first.empty()) { shaderDefineStr += "\n"; } else { shaderDefineStr += " "; - shaderDefineStr += cd_itr->second.first; + shaderDefineStr += dp.first; shaderDefineStr += "\n"; }