Historically, LWJGL has always stripped unnecessary postfixes from native functions. For example, the native function:
void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)has the 'fv' postfix. It's there because C doesn't support function overloading and we'd like to overload the last argument (value) with different types. In this case, it's an array (pointer) to floats and 'fv' means "float vector" or "array of floats". This native function is mapped to the following two Java methods (in both LWJGL 2.x and 3):
void glUniformMatrix4f(int location, int count, boolean transpose, ByteBuffer value)Since Java does support function overloading, we don't need the postfixes. A NIO buffer automatically means "arrays of values" and a FloatBuffer in the second case means "array of floats". So, this is nice from a Java perspective, so why does this poll exist? A couple of reasons:
void glUniformMatrix4(int location, boolean transpose, FloatBuffer value)
- New users or users experienced in the native API are often confused. They try to compile some code that uses the original function names and cannot understand why compilation fails. This can be a bad first experience with LWJGL, which is critical for adoption of the library. They would have to go through the FAQ to figure it out and we all know no one reads documentation.
- Modern IDEs. Is there anyone that manually types OpenGL functions? And if you do, are a couple of extra characters really a problem?
The drawbacks would be:
- Extra work when porting LWJGL 2.x code to 3.
- No overloading obviously, changing the argument type means also changing the function name.