| 45 | | osg::ref_ptr<osg::ImageSequence> imageSequence = new osg::ImageSequence; |
| 46 | | imageSequence->addImage(image_0.get()); |
| 47 | | imageSequence->addImage(image_1.get()); |
| 48 | | imageSequence->addImage(image_2.get()); |
| 49 | | imageSequence->addImage(image_3.get()); |
| 50 | | |
| | 45 | imageSequence->setDuration(2.0); |
| | 46 | imageSequence->addImage(osgDB::readImageFile("Cubemap_axis/posx.png")); |
| | 47 | imageSequence->addImage(osgDB::readImageFile("Cubemap_axis/negx.png")); |
| | 48 | imageSequence->addImage(osgDB::readImageFile("Cubemap_axis/posy.png")); |
| | 49 | imageSequence->addImage(osgDB::readImageFile("Cubemap_axis/negy.png")); |
| | 50 | imageSequence->addImage(osgDB::readImageFile("Cubemap_axis/posz.png")); |
| | 51 | imageSequence->addImage(osgDB::readImageFile("Cubemap_axis/negz.png")); |
| | 52 | |
| | 53 | #if 1 |
| 52 | | texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); |
| 53 | | texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); |
| 54 | | texture->setWrap(osg::Texture2D::WRAP_R,osg::Texture2D::REPEAT); |
| | 55 | texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR); |
| | 56 | texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR); |
| | 57 | texture->setWrap(osg::Texture::WRAP_R,osg::Texture::REPEAT); |
| 59 | | texture->setUpdateCallback(new osg::ImageSequence::UpdateCallback); |
| | 62 | //texture->setUpdateCallback(new osg::ImageSequence::UpdateCallback); |
| | 63 | #else |
| | 64 | osg::TextureRectangle* texture = new osg::TextureRectangle; |
| | 65 | texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR); |
| | 66 | texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR); |
| | 67 | texture->setWrap(osg::Texture::WRAP_R,osg::Texture::REPEAT); |
| | 68 | // texture->setResizeNonPowerOfTwoHint(false); |
| | 69 | texture->setImage(imageSequence.get()); |
| | 70 | //texture->setTextureSize(512,512); |
| | 71 | |
| | 72 | //texture->setUpdateCallback(new osg::ImageSequence::UpdateCallback); |
| | 73 | #endif |