Hello Mike,

Are you getting any InfoLog messages from the GLSL compile or link?

No, I am not getting any messages. If I voluntarily introduce an error in one of my shaders, then I get the error message on the console. But otherwise it all runs fine.

Another point is that it all runs fine, no crashes or anything, so I guess my allocation of the Vec4Array and all that is ok... Can you spot anything wrong there?

Note that there was an error in my original post,

             osg::ref_ptr<osg::Vec4Array> colors =
                 new osg::Vec4Array(normals->getDataSize());

should have been

             osg::ref_ptr<osg::Vec4Array> colors =
                 new osg::Vec4Array(vertices->getDataSize());

(my original code works on normals but for the sake of posting the code to the list I changed it to vertices)

BTW a working example of GLSL generic attributes is the diffraction shader in http://osgtoy.svn.sourceforge.net/viewvc/osgtoy/osgtoy/trunk/osgtoy-data/compactdisc.osg It binds a "tangent" attribute to slot 5.

I'll check that out. Can I just display the osg file with osgviewer, or do I need osgToy?

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay     [EMAIL PROTECTED]
                        http://whitestar02.webhop.org/

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to