Actually I haven't tried any of these for various reasons: According to the post with the most info,
“There are serveral ways to do it: 1. alternative: Just use the opengl example from speedtree and wrap it with a custom drawable. Using this solution there are many pros: * easy to integrate cons: * your are using the texture loading/management of speedtree * you loose the ability of multithreading/multicontext stuff of osg, because the speedtree example uses CG in a non-multicontext version 2. alternative: Create a osg wrapper for CG (as custom stateattributes) in osg and use the example to build the appropiate osg geometry. pros: * no need to touch the speedtree shader * useable in multicontext/multithreaded environment. cons: * Integrating CG into osg is a daunting task. However CG does not make any guaranties about the opengl state after it has been applied, so you can't use it with other stateattributes or in a hierarchy of statesets. So I wouldn't recommend using CG at all in OSG. 3. alternative: Like above you port all the geometry to osg as well as the CG shaders to GLSL. Porting the shaders to GLSL is easy. I haven't done anything with shaders before, but if you take a look at Mike Weiblen GLSL quickrefernce it should be really easy to port the CG shader. pros: * now is pure osg, you don't have any custom drawable or wrappers in it, EXCEPT: SpeedWind - Speedtree provides a class for creating wind. Just build a basic wrapper which gets called in the update cycle. “ Further Comments I assume that the above methods involve SpeedTree prior to v5, which is what I am using. According to the SpeedTree website v5 includes a reorganization of the SDK. How much, I do not know, but maybe someone has experience with it and OSG. I assume that the above reference to CG means nvidia Cg? 3 Isn't an option because we want to integrate SpeedTree, not rewrite it. Our goal is to use SpeedTree not develop a copy. Having seen the source code, there is much more to it than porting geometry and shaders. Wyatt On Wed, Oct 28, 2009 at 7:48 AM, Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com> wrote: > > Hello Wyatt, > >> I would like to integrated SpeedTree 5.0 into an osg application. Having >> searched the mailing list archives the most recent mention of a SpeedTree >> example that I found was over a year ago. Has anyone been using SpeedTree >> with OSG and possibly put together an example that would show how to use >> SpeedTree with a later version of OSG? > > Have you tried what that message said? > > Even if the most recent mention was a year ago, I doubt OSG has changed > enough in one year that it won't work anymore. So why don't you try that and > see if it works? If it doesn't, then you can always come back here with > specific questions. > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > _______________________________________________ > 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