Hi Tim. Texture2D and TextureRectangle are wrappers around two distinct types of OpenGL textures, and at a C++ level are both subclassed from osg::Texture, so there is no OpenGL level mapping that makes sense in attempting to convert one to the other, and at the C++ level there isn't any means for casting one to the other, there are different end of storty.
I really no clue as to why you are thinking that this "cast" might be appropriate or useful, but it's not even close to something that is either possible or useful. The best we can do is ask you to take a step back and tell us what the problem you have. Robert. On Mon, 25 Jun 2018 at 11:39, Tim Whowantstoknow <tare....@web.de> wrote: > > Hi, > > is there a way to cast or convert from Texture2D to TextureRectangle (or the > other way round)? I don't strictly need it, but it'd help me debugging a > multi pass pipeline that seems to loose information somewhere from prerender > cameras to the final rendering to the frame buffer. > > I have tried to just dynamically cast between the two, but the resulting > pointer is a nullpointer, so that does not seem to work. Technically they > aren't sub classes of each other either, but as far as i can see they don't > really use different members of methods. > > Just additional info, since I use them for rendering to texture I don't have > an image that I could just apply to the other texture. > > Kind Regards, > Tim > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=74134#74134 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org