Hello!
Yesterday I found the hard way that if attributes are not guaranteed to be in order of their definition in a GLSL shader. I was trying to run my LWJGL on macOS and all stuff that required texture wasn't rendering, after a couple of hours of banging my head on the wall, I happened to find one model that was rendering at least something. Upon further investigation I noticed is that if I tweak model's UV it affects the vertices, and vice versa, but changing the colors still works as expected. I couldn't find anything on Google about it, but at one point I remembered about layout(location = ...). Adding explicit layout location indices fixed the textured shaders.
Apparently, for some of my shaders, macOS' (Catalina) OpenGL gives attribute indices in a random order.
So the question: is it a bad practice that I don't use glGetAttributeLocation? Would it be a better idea to rewrite the VAO code to find attribute locations from shaders, or is it fine to just specify for every vertex shader attribute a layout(location = ...)?
Thank you for attention!