LWJGL - lUniformMatrix4fv

Hi Everyone,

So im working on my game library an ran into a bit of a snag.
is lUniformMatrix4fv missing within LWJGL?

if so anyone find a good way to pass a list of per instanced matrix to a shader?

thanks
j.

glUniformMatrix4fv is simply glUniformMatrix4 in LWJGL.

I hope I am not misunderstanding the question, could you clarify more on what you mean by: “if so anyone find a good way to pass a list of per instanced matrix to a shader?”

i just figured it out… your response it right!

use glUniformMatrix4f in your code… put all the values in the buffer.

in your .vert shader define the variable as a mat4[] and use the gl_InstanceID … :slight_smile:
the magic happends under the covers for you.