Changeset 13041 for OpenSceneGraph/trunk/src/osg/GLExtensions.cpp
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osg/GLExtensions.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/GLExtensions.cpp
r12454 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 82 82 if (*startOfWord && strcmp(extension, startOfWord) == 0) 83 83 return true; 84 84 85 85 return false; 86 86 } … … 98 98 // first check to see if GL version number of recent enough. 99 99 bool result = requiredGLVersion <= osg::getGLVersionNumber(); 100 100 101 101 if (!result) 102 { 102 { 103 103 // if not already set up, initialize all the per graphic context values. 104 104 if (!s_glInitializedList[contextID]) … … 188 188 189 189 if (wglextensions) 190 { 190 { 191 191 const char* startOfWord = wglextensions; 192 192 const char* endOfWord; … … 214 214 result = extensionSet.find(extension)!=extensionSet.end(); 215 215 } 216 216 217 217 // now see if extension is in the extension disabled list 218 218 bool extensionDisabled = false; … … 223 223 if (!disableString.empty()) 224 224 { 225 225 226 226 std::string::size_type pos=0; 227 227 while ( pos!=std::string::npos && (pos=disableString.find(extension,pos))!=std::string::npos ) … … 229 229 std::string::size_type previousColon = disableString.find_last_of(':',pos); 230 230 std::string::size_type previousSemiColon = disableString.find_last_of(';',pos); 231 231 232 232 std::string renderer = ""; 233 233 if (previousColon!=std::string::npos) … … 239 239 if (!renderer.empty()) 240 240 { 241 241 242 242 // remove leading spaces if they exist. 243 243 std::string::size_type leadingSpaces = renderer.find_first_not_of(' '); … … 250 250 251 251 } 252 252 253 253 if (renderer.empty()) 254 254 { … … 256 256 break; 257 257 } 258 258 259 259 if (rendererString.find(renderer)!=std::string::npos) 260 260 { 261 261 extensionDisabled = true; 262 262 break; 263 264 } 265 263 264 } 265 266 266 // move the position in the disable string along so that the same extension is found multiple times 267 267 ++pos;
