Changeset 6941 for OpenSceneGraph/trunk/examples/osgmovie/osgmovie.cpp
- Timestamp:
- 06/12/07 16:20:16 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgmovie/osgmovie.cpp
r6935 r6941 1 // -*-c++-*- 1 /* OpenSceneGraph example, osgmovie. 2 * 3 * Permission is hereby granted, free of charge, to any person obtaining a copy 4 * of this software and associated documentation files (the "Software"), to deal 5 * in the Software without restriction, including without limitation the rights 6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 * copies of the Software, and to permit persons to whom the Software is 8 * furnished to do so, subject to the following conditions: 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 11 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 13 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 15 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 16 * THE SOFTWARE. 17 */ 2 18 3 19 #include <osgViewer/Viewer> … … 260 276 0.0f,image->t(), image->s(),0.0f); 261 277 278 osg::TextureRectangle* texture = new osg::TextureRectangle(image); 279 texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); 280 texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE); 281 282 262 283 pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0, 263 new osg::TextureRectangle(image),264 osg::StateAttribute::ON);265 284 texture, 285 osg::StateAttribute::ON); 286 266 287 return pictureQuad; 267 288 } … … 274 295 275 296 osg::Texture2D* texture = new osg::Texture2D(image); 276 texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR); 277 297 texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR); 298 texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); 299 texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE); 300 301 278 302 pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0, 279 303 texture,
