i got a quick question about passing a float array to a shader and receiving it as a struct defined inside the shader.
both my light structs (application and shader) contain 15 floats in the same order.
now if i send my array of structs of 15 floats with
glUniform1fv(glGetUniformLocation(programID, "lights"), 15 * lights.size(), lights.data());
and in the shader i receive it with
uniform float lights[MAX_LIGHTS * 15];
everything works fine but i would to get it this way
uniform Light lights[MAX_LIGHTS];
which doesnt seem to work :/
so how do i not receive an array of numlights * 15 floats but an array of light objects with 15 floats?