HI Maxime, The best way to implement projective texture in the OSG is to use a TexGenNode that positions the texture coordinate generation in space. The osgspotlight example shows this in action. There isn't any need to have lots of separate TexGen objects in your scene, a single one attached to a single TexGenNode is all that you require, so it really isn't an issue of Geodes vs Shaders, projective texturing in the OSG is completely orthogonal, you can use it with or without shaders.
Robert. On Mon, May 11, 2009 at 3:27 PM, Maxime BOUCHER <[email protected]> wrote: > Hi, > > It's me again. > In order to implement a nice Projective Texture Mapping, I want to project on > all visible primitives, and only it. > Maybe I'm wrong, and if I am, please tell me, but I projective-texture-map > using osg::TexGen that I only can apply on Groups or Geodes (well, anything > StateSet-able) so not on primitives. > Thus I think of extracting each visible primitive and putting it in a new > Geode in order to only texture them. > Moreover, I'd like to have several projectors, then having all visible > primitives extracted will make the managing of multi-texturing much more > easier. > This way, I may add a significant number of Geodes to my scene, this may be > costful to render. > > The other way is to define shaders for these visible primitives. > > In your opinion, which of these two ways is the more efficient? > > Thank you! > > Cheers, > Maxime > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=11809#11809 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

