Hi, I've looked for a similar problem on the forum and haven't found but if there is one, then you can hit me :).
I will to be as clear as possible, but ask me if there is something that is not. So let us say that I have an application like this : CompositeViewer |------------------| Camera1 Camera2 |------------------| ( Scene Root ) I have two cameras part of the same osgViewer, a composite viewer, rendering the same scene on different points of view. There is a drawable in the scenegraph that i want to be textured differently if it is rendered by the camera 1 or 2. As far as I understood, because of the viewer, the rendering of the two cameras are more or less at the same time. So I can not put a predrawcallback on my cameras to change the texture on the drawable because the predrawcallback of the second camera would change the texture before the first camera has rendered the scene. What I wanted to be was to but an osg::Drawable::DrawCallback on my drawable to change texture according to the camera but it seems that it is not possible. Code: virtual void drawImplementation(osg::RenderInfo& renderInfo, const osg::Drawable* drawable) const Because the drawable is const and so I can not modify its StateSet to simply change the texture. I obviously could load one scene by viewer, but I was looking for another way to achieve this. I can't see any options remaining so I'm desperately asking for your help :). A bit of context of my problem, I tried to simplify it to be clearer. The drawable I'm talking about is in fact a mirror, and i want that the texture of the mirror (pre-rendered by other cameras) change according to my point of view. Thanks for reading me and for any clue you can give me. Regards, Olivier[/code] ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55986#55986 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org