Hi Bryan, Take a look at osgshaders example in the examples directory. It should show you all the basics for using shaders in OSG. You don't have to write any of your own code (especially not in pure GL) to use them. Also I seen a quite a few threads blow by on setting attributes of verticies so just search the threads to find what you need for that specific aspect of the shaders. biv
On 5/11/07, Wasileski, Bryan J. <[EMAIL PROTECTED]> 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 _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
