Skip to main content
1 of 4

I might know what your problem is. I will be honest I dont know much C# im a C++ guy. But from looking at the repo i see this inside your form1 file

 int i = 0; foreach (var bmat in animator.Transformations) { Console.WriteLine("Sending matrix @index " + i + " " + bmat.ToString()); Console.WriteLine(bmat.m00.ToString() + " " + bmat.m10.ToString() + " " + bmat.m20.ToString() + " " + bmat.m30.ToString()); Console.WriteLine(bmat.m01.ToString() + " " + bmat.m11.ToString() + " " + bmat.m21.ToString() + " " + bmat.m31.ToString()); Console.WriteLine(bmat.m02.ToString() + " " + bmat.m12.ToString() + " " + bmat.m22.ToString() + " " + bmat.m32.ToString()); Console.WriteLine(bmat.m03.ToString() + " " + bmat.m13.ToString() + " " + bmat.m23.ToString() + " " + bmat.m33.ToString()); gl.UniformMatrix4fv(gl.GetUniformLocation(program, "finalBonesMatrices[" + i.ToString() + "]"), 1, false, bmat.ToArray()); i++; } 

This specific line has a problem

gl.UniformMatrix4fv(gl.GetUniformLocation(program, "finalBonesMatrices[" + i.ToString() + "]"), 1, false, bmat.ToArray());

You are putting "1" in paramater 2 which is the count variable, change this to the size of the array of model matrices. for more info check (https://registry.khronos.org/OpenGL-Refpages/gl4/html/glUniform.xhtml) to to check what those parameters mean, from my understanding you gotta pass it the size of the array.

for more clarification, this is how my code looks like glUniformMatrix4fv(currentShader->GetUniformID("gBones[" + std::to_string(i) + ']'), Transforms.size(), GL_FALSE, Transforms[i]);