Hi all, I beg your pardon for being that boring, but no one's got a solution for this?
Max wrote: > > 3)It seems I can't do the PTM using osg::TextureRectangle but osg::Texture2D > works. > I'm running OpenSceneGraph 2.6 maybe this have been fixed since that version. > Thus I need to know the new width and height of my resized image (which is > done in order to match to Texture2D). > But when I execute: > > > Code: > > ref_ptr<Image> img = > osgDB::readImageFile("../Data_Calibrage/Image/IMG_5316_small.jpg"); > > //TextureRectangle doesn't seem to be supported for projective texture > mapping > ref_ptr<Texture2D> tex = new Texture2D(img.get()); > std::cout<<"Width of the texture: "<<tex->getTextureWidth()<<std::endl; > std::cout<<"Height of the texture: > "<<tex->getTextureHeight()<<std::endl; > std::cout<<"Width of the image of the texture: > "<<tex->getImage()->s()<<std::endl; > std::cout<<"Height of the image of the texture: > "<<tex->getImage()->t()<<std::endl; > > > > I've got: > > Code: > > 0 > 0 > 640 > 480 > > > > > How can I know these new width and height ? Thanks (at least for reading ;) ) ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10897#10897 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org