for(i = 0; i < 16 /* Max vertex attribs */; i++) {
I think you should be using MAX_ATTRIBS there.
Changing the strided data like that in drawPrimitive looks rather hacky to me.
H. Verbeet wrote:
for(i = 0; i < 16 /* Max vertex attribs */; i++) {
I think you should be using MAX_ATTRIBS there.
Changing the strided data like that in drawPrimitive looks rather hacky to me.
You cannot access the strided data by both named approach (u.s.something) and indexed approach. The two are completely independent strided formats - one is used for the fixed pipeline, and the other is used for the shader pipeline.
I think both of you are wrong, and the correct number is 15 + WINED3DDP_MAXTEXCOORD, which is the bigger of the two unioned together. Only modifying the first 16 will break: normal2, tangent, binormal, tessFactor, fog, depth, sample in the fixed pipeline case (true, I don't see these being used anywhere right now ...).
Please leave writing of the strided data to the functions designed for this purpose.
Ivan
On 03/05/07, Ivan Gyurdiev ivg231@gmail.com wrote:
I think both of you are wrong, and the correct number is 15 + WINED3DDP_MAXTEXCOORD,
True, I only noticed the hardcoded 16, not that the code's actually looping over the strided data rather than actual vertex attributes.