I kind of figured it out myself. The accessing of the vertex data works as
I thought it should, however, there seems to be a problem with setting
attributes as ivec4. When I use vec4 and then later cast to ivec4
everything works.
Am Samstag, 20. Dezember 2014 21:57:59 UTC+1 schrieb Tobias Jammer:
>
> Hi everyone,
>
> I want to do skinning for animations on the gpu in a shader. To draw, I am
> using an indexed vertex list (through batch.add_indexed) and then draw the
> batch. If I understand correctly I can attach some generic data to my
> vertices (in addition to vertex data, normals etc.), so what I did is the
> following:
>
> self.vertex_list = batch.add_indexed(
> length, self.mode, group,
> indices, *[('v3f/dynamic', self.verts),
> ('n3f/dynamic', self.norms),
> ('c4f/static', self.color * length),
> ('4g4f/static', weights), ('5g1i/static', w_lens),
> ('6g4i/static', w_bone_ids)])
>
> Only now I'm stuck when it comes to accessing this data in the shader
> program. I tried
>
> layout(location = 4) in vec4 weights;
> layout(location = 5) in int count;
> layout(location = 6) in ivec4 bone_ids;
>
> but this doesn't seem to work.
>
> What's the correct way to do this?
>
> Best
> Tobias
>
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.