Hi, Thank you, I think i will be able to add the code into the trunk soon :)
Cool Cheers, Cedric -- +33 659 598 614 Cedric Pinson mailto:[email protected] http://www.plopbyte.net On Wed, 2009-10-21 at 09:21 -0400, Jean-Sébastien Guay wrote: > Hi Cedric, > > > I used the addBindAttribLocation to the program but it generated an > > error. Because the compiling of the program gave another location to put > > my data. Anyway i will a another try to test it. > > I've been using addBindAttribLocation in my software for a while, so I > know it works. > > It basically just associates a name to an attribute number, so just make > sure you use an unused attribute location (like 9+ for example, just to > be safe) and then use that name in your shader, and use that number when > adding an attribute array to your osg::Geometry. As long as you call > addBindAttribLocation before the shader is compiled and linked, it works > well (I had that problem at one point, I was calling it from a callback > after the shader had been compiled, and I would get undefined data in my > shader instead of the data I was putting in the arrays). > > In my Masters project I was storing Spherical Harmonics coefficients in > 7 consecutive Vec4 attribute arrays (I needed 25 floats) and it worked > well. In our software here at CM-Labs we just use one attribute array > right now, but it works equally well. > > Hope this helps, > > J-S
signature.asc
Description: This is a digitally signed message part
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

