Hi, there are a couple examples using vertex attributes in osgToy, see compactdisc.osg and compactdisc-texcoord.osg at http://osgtoy.cvs.sourceforge.net/osgtoy/osgtoy/osgtoy-data/ The former uses a GLSL generic attribute, the latter uses a predefined GLSL texcoord.
those example only have a vertex shader, using the default fixed function pipeline for the fragment processing. cheers -- mew Wasileski, Bryan J. wrote: > Hi all, > > I'm looking for some advice on implementing a vertex shader for surface > geometry being creating in OSG. > > I have a surface consisting of triangular strips (and other > primitives) which are created using arrays of vertices and indices. For > each vertex, I'd like to assign an attribute which I can access within > the shader. Normally, this is done by creating and assigning the vertex > attribute between the glBegin() / glEnd() for each vertex in the > geometry. Since OSG abstracts away the glBegin, glEnd, etc., how do I > define the attributes of the vertices? Modify the source? Straight OpenGL? > > Thanks in advance. > > Bryan -- Mike Weiblen -- Austin Texas USA -- http://mew.cx/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
