Skip to content
Permalink
Browse files

fix(GL): signatures of `GetnUniform(u)iv`

  • Loading branch information...
Spasi committed Jul 9, 2019
1 parent f8a32e3 commit 7cf5f4f10b701138ce629d737bcbc479283510d0
@@ -2,6 +2,12 @@

_Not Released Yet_

- TODO: update bindings
- TODO: update rpmalloc
- TODO: add new par library
- TODO: add Khronos SPIRV-Cross
- TODO: add mimalloc (+bench)

This build includes the following changes:

#### Bindings
@@ -30,6 +36,7 @@ This build includes the following changes:

- EGL/GLES: Fixed bootstrapping code.
* Regression caused by `org.lwjgl.system.JNI` refactoring in `3.2.2`.
- OpenGL: Fixed signatures of `glGetnUniformiv` and `glGetnUniformuiv`.

#### Breaking Changes

@@ -4665,7 +4665,7 @@ public static void nglGetnUniformiv(int program, int location, int bufSize, long
*
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) {
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) {
GL45C.glGetnUniformiv(program, location, params);
}

@@ -4678,7 +4678,7 @@ public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeTyp
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
@NativeType("void")
public static float glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
public static int glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
return GL45C.glGetnUniformi(program, location);
}

@@ -4702,7 +4702,7 @@ public static void nglGetnUniformuiv(int program, int location, int bufSize, lon
*
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) {
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) {
GL45C.glGetnUniformuiv(program, location, params);
}

@@ -4715,7 +4715,7 @@ public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeTy
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
@NativeType("void")
public static float glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
public static int glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
return GL45C.glGetnUniformui(program, location);
}

*
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) {
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) {
GL45C.glGetnUniformiv(program, location, params);
}

*
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) {
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) {
GL45C.glGetnUniformuiv(program, location, params);
}

@@ -4283,7 +4283,7 @@ public static double glGetnUniformd(@NativeType("GLuint") int program, @NativeTy
*
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) {
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) {
nglGetnUniformiv(program, location, params.remaining(), memAddress(params));
}

@@ -4296,10 +4296,10 @@ public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeTyp
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
@NativeType("void")
public static float glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
public static int glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
FloatBuffer params = stack.callocFloat(1);
IntBuffer params = stack.callocInt(1);
nglGetnUniformiv(program, location, 1, memAddress(params));
return params.get(0);
} finally {
@@ -4325,7 +4325,7 @@ public static float glGetnUniformi(@NativeType("GLuint") int program, @NativeTyp
*
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) {
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) {
nglGetnUniformuiv(program, location, params.remaining(), memAddress(params));
}

@@ -4338,10 +4338,10 @@ public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeTy
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
@NativeType("void")
public static float glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
public static int glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
FloatBuffer params = stack.callocFloat(1);
IntBuffer params = stack.callocInt(1);
nglGetnUniformuiv(program, location, 1, memAddress(params));
return params.get(0);
} finally {
@@ -5615,7 +5615,7 @@ public static void glGetnUniformdv(@NativeType("GLuint") int program, @NativeTyp
*
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) {
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) {
long __functionAddress = GL.getICD().glGetnUniformiv;
if (CHECKS) {
check(__functionAddress);
@@ -5628,7 +5628,7 @@ public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeTyp
*
* @see <a target="_blank" href="http://docs.gl/gl4/glGetUniform">Reference Page</a>
*/
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) {
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) {
long __functionAddress = GL.getICD().glGetnUniformuiv;
if (CHECKS) {
check(__functionAddress);
@@ -262,7 +262,7 @@ public static void nglGetnUniformiv(int program, int location, int bufSize, long
* @param location the uniform location
* @param params the buffer in which to place the returned data
*/
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) {
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) {
GL45C.glGetnUniformiv(program, location, params);
}

@@ -273,7 +273,7 @@ public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeTyp
* @param location the uniform location
*/
@NativeType("void")
public static float glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
public static int glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
return GL45C.glGetnUniformi(program, location);
}

@@ -295,7 +295,7 @@ public static void nglGetnUniformuiv(int program, int location, int bufSize, lon
* @param location the uniform location
* @param params the buffer in which to place the returned data
*/
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) {
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) {
GL45C.glGetnUniformuiv(program, location, params);
}

@@ -306,7 +306,7 @@ public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeTy
* @param location the uniform location
*/
@NativeType("void")
public static float glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
public static int glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) {
return GL45C.glGetnUniformui(program, location);
}

@@ -331,12 +331,12 @@ public static void glGetnUniformfv(@NativeType("GLuint") int program, @NativeTyp
}

/** Array version of: {@link #glGetnUniformiv GetnUniformiv} */
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) {
public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) {
GL45C.glGetnUniformiv(program, location, params);
}

/** Array version of: {@link #glGetnUniformuiv GetnUniformuiv} */
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) {
public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) {
GL45C.glGetnUniformuiv(program, location, params);
}

@@ -1416,7 +1416,7 @@ val GL45C = "GL45C".nativeClassGL("GL45C") {
GLuint("program", "the program object"),
GLint("location", "the uniform location"),
AutoSize("params")..GLsizei("bufSize", "the maximum number of bytes to write to {@code params}"),
ReturnParam..GLfloat.p("params", "the buffer in which to place the returned data")
ReturnParam..GLint.p("params", "the buffer in which to place the returned data")
)

void(
@@ -1426,6 +1426,6 @@ val GL45C = "GL45C".nativeClassGL("GL45C") {
GLuint("program", "the program object"),
GLint("location", "the uniform location"),
AutoSize("params")..GLsizei("bufSize", "the maximum number of bytes to write to {@code params}"),
ReturnParam..GLfloat.p("params", "the buffer in which to place the returned data")
ReturnParam..GLuint.p("params", "the buffer in which to place the returned data")
)
}

0 comments on commit 7cf5f4f

Please sign in to comment.
You can’t perform that action at this time.