static GLboolean check_attrib(const GLint expected[4], int sign, const char *func) { if (sign == SIGNED) { GLint vals[4]; glGetVertexAttribIivEXT(Index, GL_CURRENT_VERTEX_ATTRIB_ARB, vals); if (expected[0] != vals[0] || expected[1] != vals[1] || expected[2] != vals[2] || expected[3] != vals[3]) { fprintf(stderr, "%s: %s failed\n", TestName, func); fprintf(stderr, " Expected: %d, %d, %d, %d\n", expected[0], expected[1], expected[2], expected[3]); fprintf(stderr, " Found: %d, %d, %d, %d\n", vals[0], vals[1], vals[2], vals[3]); return GL_FALSE; } } else { GLuint vals[4]; glGetVertexAttribIuivEXT(Index, GL_CURRENT_VERTEX_ATTRIB_ARB, vals); if (expected[0] != vals[0] || expected[1] != vals[1] || expected[2] != vals[2] || expected[3] != vals[3]) { fprintf(stderr, "%s: %s failed\n", TestName, func); fprintf(stderr, " Expected: %d, %d, %d, %d\n", expected[0], expected[1], expected[2], expected[3]); fprintf(stderr, " Found: %u, %u, %u, %u\n", vals[0], vals[1], vals[2], vals[3]); return GL_FALSE; } } return GL_TRUE; }
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglGetVertexAttribIuivEXT__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { glGetVertexAttribIuivEXTPROC glGetVertexAttribIuivEXT = (glGetVertexAttribIuivEXTPROC)tlsGetFunction(1742); intptr_t params = (intptr_t)paramsAddress; UNUSED_PARAM(clazz) glGetVertexAttribIuivEXT(index, pname, params); }
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglGetVertexAttribIuivEXT(JNIEnv *env, jclass clazz, jint index, jint pname, jobject params, jint params_position, jlong function_pointer) { GLuint *params_address = ((GLuint *)(*env)->GetDirectBufferAddress(env, params)) + params_position; glGetVertexAttribIuivEXTPROC glGetVertexAttribIuivEXT = (glGetVertexAttribIuivEXTPROC)((intptr_t)function_pointer); glGetVertexAttribIuivEXT(index, pname, params_address); }