You mean taking 64->16 in this array: Bones? What graphics card do you have?
I’m betting the problem is that ARB_vertex_program only guarentees a minimum of 96 const shader 4-vectors, so you’re overflowing it. You have 64*3 + 5 const shader slots (‘parameters’ in ARB_vertex_program syntax).
When you’re loading up your bones, you should check the native resource limit for the # of the parameters:
int maxProgramNativeParams = 0;
glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB, &maxProgramNativeParams);
And adjust the number of arrays you pack accordingly.
Most cards just have 96 param slots, but some of the newer ones like my Radeon9800 has 256.
edit - UBB codes
edit - not sure about the 5 extra slots for (m, pos, normal) in 64*3 + 5, would need to the ARB_vertex_program version to be absolutely sure
[This message has been edited by Stephen_H (edited 01-02-2004).]
“I’m betting the problem is that ARB_vertex_program only guarentees a minimum of 96 const shader 4-vectors”
I checked and you’re right. Though I don’t know why the compiler crashed and didn’t just pop an error message.
However 96 const vectors is ridiculous for doing skinning, I need the vp to support at least 64 bones.