Changeset 13041 for OpenSceneGraph/trunk/src/osg/FrameBufferObject.cpp
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/FrameBufferObject.cpp
r12432 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 */ … … 89 89 LOAD_FBO_EXT(glGetRenderbufferParameteriv); 90 90 91 _supported = 91 _supported = 92 92 glBindRenderbuffer != 0 && 93 93 glDeleteRenderbuffers != 0 && … … 241 241 { 242 242 ext->glGenRenderbuffers(1, &objectID); 243 if (objectID == 0) 243 if (objectID == 0) 244 244 return 0; 245 245 dirty = 1; … … 336 336 TEXTURE2DMULTISAMPLE 337 337 }; 338 338 339 339 TargetType targetType; 340 340 ref_ptr<RenderBuffer> renderbufferTarget; … … 427 427 { 428 428 osg::Texture* texture = attachment._texture.get(); 429 429 430 430 if (texture) 431 431 { … … 462 462 return; 463 463 } 464 464 465 465 osg::Texture2DArray* texture2DArray = dynamic_cast<osg::Texture2DArray*>(texture); 466 466 if (texture2DArray) … … 557 557 558 558 Texture::FilterMode minFilter = _ximpl->textureTarget->getFilter(Texture::MIN_FILTER); 559 if (minFilter==Texture::LINEAR_MIPMAP_LINEAR || 560 minFilter==Texture::LINEAR_MIPMAP_NEAREST || 561 minFilter==Texture::NEAREST_MIPMAP_LINEAR || 559 if (minFilter==Texture::LINEAR_MIPMAP_LINEAR || 560 minFilter==Texture::LINEAR_MIPMAP_NEAREST || 561 minFilter==Texture::NEAREST_MIPMAP_LINEAR || 562 562 minFilter==Texture::NEAREST_MIPMAP_NEAREST) 563 563 { … … 587 587 return; 588 588 } 589 589 590 590 switch (_ximpl->targetType) 591 591 { … … 859 859 if (_unsupported[contextID]) 860 860 return; 861 862 861 862 863 863 FBOExtensions* ext = FBOExtensions::instance(contextID,true); 864 864 if (!ext->isSupported()) … … 893 893 if (dirtyAttachmentList) 894 894 { 895 // the set of of attachments appears to be thread sensitive, it shouldn't be because 895 // the set of of attachments appears to be thread sensitive, it shouldn't be because 896 896 // OpenGL FBO handles osg::FrameBufferObject has are multi-buffered... 897 897 // so as a temporary fix will stick in a mutex to ensure that only one thread passes through here … … 908 908 909 909 } 910 911 910 911 912 912 ext->glBindFramebuffer(target, fboID); 913 913 … … 937 937 else 938 938 { 939 OSG_WARN << 939 OSG_WARN << 940 940 "Warning: FrameBufferObject: could not attach PACKED_DEPTH_STENCIL_BUFFER, " 941 941 "EXT_packed_depth_stencil is not supported !" << std::endl; … … 947 947 break; 948 948 } 949 } 949 } 950 950 dirtyAttachmentList = 0; 951 951 }
