In com.g3d.Uniform class at line 171 there is a little bug
public void setVector4Array(Quaternion[] vals){
if (location == -1)
return;
if (dataType != null && dataType != Type.Vector4Array)
throw new IllegalArgumentException("Expected a "+dataType.name()+" value!");
FloatBuffer fb = (FloatBuffer) value;
if (fb == null){
fb = BufferUtils.createFloatBuffer(vals.length * 4);
}else if (fb.capacity() < vals.length){
throw new BufferOverflowException();
}
fb.rewind();
for (Quaternion q : vals){
q.get(fb);
}
fb.flip();
value = fb;
dataType = Type.Vector3Array; // the bug
updateNeeded = true;
}
Should be:
public void setVector4Array(Quaternion[] vals){
if (location == -1)
return;
if (dataType != null && dataType != Type.Vector4Array)
throw new IllegalArgumentException("Expected a "+dataType.name()+" value!");
FloatBuffer fb = (FloatBuffer) value;
if (fb == null){
fb = BufferUtils.createFloatBuffer(vals.length * 4);
}else if (fb.capacity() < vals.length){
throw new BufferOverflowException();
}
fb.rewind();
for (Quaternion q : vals){
q.get(fb);
}
fb.flip();
value = fb;
dataType = Type.Vector4Array;
updateNeeded = true;
}