VertexAttribute in GLSL

a glVertexAttributeMatrix3f or something like that

You can use glVertexAttribute4f four times with consecutive indices to load a 4x4 matrix. The same works with attribute arrays, using the stride parameter.

So this function would just be a shortcut for functionality that does already exist. It won’t help with performance either, so it is really not necessary.

in immediate mode this will make a performance difference i think.

and why does a matrix function for setting a uniform exist when it is so senseless?

and why does a matrix function for setting a uniform exist when it is so senseless?
Because usually, matrices don’t change on a per-vertex basis. They change on a per-mesh basis.

The method with consecutive indices doesn’t work with uniforms, there you are required to use the matrix version of the function, so in the case of uniforms it’s not senseless.

I’m not entirely sure why this was specified that way.

Perhaps because usually you don’t use immediate mode for attribute data, at least not where performance is important, while uniforms are always set manually. The way it is now, it is consistent with the vertex array api.

I’m not entirely sure why this was specified that way.
I suspect it’s a combination of hardware and expected use. Hardware certainly doesn’t recognize a “matrix attribute” and probably isn’t going to anytime soon. However, uniforms are often matrices, so that should be supported by an abstraction, despite the fact that few hardware intrinsically supports matrix types.

At the same time, if attribute uniforms were something that were something that were frequently used, or even mildly frequently used, then they might be supported as an abstraction. Since this isn’t the case, and matrix attributes are a rare thing, it seems perfectly reasonable to leave them out of the abstraction.