I'm trying to pass vertex attributes to a GLSL vertex shader.
I've created the following vertex_list:
self.vertex_list = pyglet.graphics.vertex_list(
num_verts,
('v3f/static', verts),
('t2f/static', tcs),
('0g1f', attribs),
)
I've also put this in my GLSL vertex shader:
attribute float index;
But I'm unsure how to bind the attribute array to the GLSL input?
The GL spec says I should call glGetAttribLocationARB which receives the
attribute name.
Should I call this, then use the returned value as the first value of the
attribute?
Ie. "Xg1f" instead of "0g1f"
I'm using the GLSL shader wrapper from here incase that matters:
http://swiftcoder.wordpress.com/2008/12/19/simple-glsl-wrapper-for-pyglet/
Cheers,
Adam
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pyglet-users/-/FICCtaO1jAAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en.