Setting the default vertex attribute value

As an example, if I were to omit the VertexBuffer.Type.Color buffer from a mesh, then it is still possible to read the inColor vertex attribute value in the shader - it will simply be defaulted to (0, 0, 0, 1).

The “Non-array attribute values” section of the opengl wiki indicates that it is possible to change this default value to something else. Does JME support this setting in any way?

I guess, it does also say that “Note: It is not recommended that you use these. The performance characteristics of using fixed attribute data are unknown, and it is not a high-priority case that OpenGL driver developers optimize for. They might be faster than uniforms, or they might not.”, so probably better to work it out with uniforms anyway

1 Like

…or defines.

Whatever you are trying to do, there are better ways to do it.