[FIXED] Incorrect types used in GL45/GL45C.glGetUniform[u]i[v]

Started by Unh0ly_Tigg, July 09, 2019, 02:43:45

Previous topic - Next topic

Unh0ly_Tigg

Both org.lwjgl.opengl.GL45 and org.lwjgl.opengl.GL45C in lwjgl3 have methods
void glGetnUniformfv(int program, int location, FloatBuffer params)
and
float glGetnUniformf(int program, int location)
and associated forms for double, int, and unsigned integers.

However, for both the integer forms
glGetnUniformiv/glGetnUniformi
and
glGetnUniformuiv/glGetnUniformui
these methods either consume FloatBuffer as the final argument, or return float in the case of the non-v methods.

This appears in (as of writing, the selected tree/blob was also the master branch)
https://github.com/LWJGL/lwjgl3/blob/ef642957c10d9b6f03774c49faa1d09937996553/modules/lwjgl/opengl/src/templates/kotlin/opengl/templates/GL45Core.kt
at the end of the file, primarily lines 1419 for
glGetnUniformiv
and 1428 for
glGetUniformuiv

Unh0ly_Tigg

As a note, by going through the commit history of the GL45/GL45Core.kt files, this issue has been here since OpenGL 4.5 was originally supported by lwjgl3 in https://github.com/LWJGL/lwjgl3/commit/57c2db0855379b6fe76a64fce9752586e4b62d05

spasi