Setting attributes on Shaders in G3D9

8 views
Skip to first unread message

David Schroeder

unread,
Mar 28, 2012, 11:56:10 AM3/28/12
to G3D Users
Is there a way to use attributes with shaders in G3D9? I'm trying to
put together example shaders for a class and being able to send vec3s
without them being explicitly positions, normals, or texture
coordinates would be very useful. I've looked through the
documentation and grepped through the source and I don't see how I can
send a VertexRange of data as an attribute for a shader. Does anyone
have any advice?

Morgan McGuire

unread,
Mar 28, 2012, 12:51:00 PM3/28/12
to g3d-...@googlegroups.com
We don't support attributes yet through Shader.  I'm actively working on it with a target of May.  

You can work around this in the current build by explicitly binding your streams with RenderDevice::setVertexAttributePointer, which I recently upgraded to support most common formats.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan
Reply all
Reply to author
Forward
0 new messages