LWJGL Forum

Programming => Bug Reports / RFE => Topic started by: Unh0ly_Tigg on July 09, 2019, 02:43:45

Title: [FIXED] Incorrect types used in GL45/GL45C.glGetUniform[u]i[v]
Post by: Unh0ly_Tigg on July 09, 2019, 02:43:45
Both org.lwjgl.opengl.GL45 and org.lwjgl.opengl.GL45C in lwjgl3 have methods
Code: [Select]
void glGetnUniformfv(int program, int location, FloatBuffer params) and
Code: [Select]
float glGetnUniformf(int program, int location) and associated forms for double, int, and unsigned integers.

However, for both the integer forms
Code: [Select]
glGetnUniformiv/glGetnUniformi and
Code: [Select]
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 (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
Code: [Select]
glGetnUniformiv and 1428 for
Code: [Select]
glGetUniformuiv
Title: Re: [BUG] Incorrect types used in GL45/GL45C.glGetUniform[u]i[v]
Post by: Unh0ly_Tigg on July 09, 2019, 02:46:05
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 (https://github.com/LWJGL/lwjgl3/commit/57c2db0855379b6fe76a64fce9752586e4b62d05)
Title: Re: [BUG] Incorrect types used in GL45/GL45C.glGetUniform[u]i[v]
Post by: spasi on July 09, 2019, 08:05:39
Thank you, will be fixed in the next snapshot with 7cf5f4f (https://github.com/LWJGL/lwjgl3/commit/7cf5f4f10b701138ce629d737bcbc479283510d0).