JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_KHRGLSharing_nclGetGLContextInfoKHR(JNIEnv *env, jclass clazz, jobject properties, jint properties_position, jint param_name, jlong param_value_size, jobject param_value, jint param_value_position, jobject param_value_size_ret, jint param_value_size_ret_position, jlong function_pointer) {
	const cl_context_properties *properties_address = ((const cl_context_properties *)(((char *)(*env)->GetDirectBufferAddress(env, properties)) + properties_position));
	cl_void *param_value_address = ((cl_void *)(((char *)safeGetBufferAddress(env, param_value)) + param_value_position));
	size_t *param_value_size_ret_address = ((size_t *)(((char *)safeGetBufferAddress(env, param_value_size_ret)) + param_value_size_ret_position));
	clGetGLContextInfoKHRPROC clGetGLContextInfoKHR = (clGetGLContextInfoKHRPROC)((intptr_t)function_pointer);
	cl_int __result = clGetGLContextInfoKHR(properties_address, param_name, param_value_size, param_value_address, param_value_size_ret_address);
	return __result;
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetActiveUniformARB(JNIEnv *env, jclass clazz, jint programObj, jint index, jint maxLength, jobject length, jint length_position, jobject size, jint size_position, jobject type, jint type_position, jobject name, jint name_position, jlong function_pointer) {
	GLsizei *length_address = ((GLsizei *)safeGetBufferAddress(env, length)) + length_position;
	GLint *size_address = ((GLint *)(*env)->GetDirectBufferAddress(env, size)) + size_position;
	GLenum *type_address = ((GLenum *)(*env)->GetDirectBufferAddress(env, type)) + type_position;
	GLcharARB *name_address = ((GLcharARB *)(*env)->GetDirectBufferAddress(env, name)) + name_position;
	glGetActiveUniformARBPROC glGetActiveUniformARB = (glGetActiveUniformARBPROC)((intptr_t)function_pointer);
	glGetActiveUniformARB(programObj, index, maxLength, length_address, size_address, type_address, name_address);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglGetTransformFeedbackVaryingEXT(JNIEnv *env, jclass clazz, jint program, jint index, jint bufSize, jobject length, jint length_position, jobject size, jint size_position, jobject type, jint type_position, jobject name, jint name_position, jlong function_pointer) {
	GLsizei *length_address = ((GLsizei *)safeGetBufferAddress(env, length)) + length_position;
	GLsizei *size_address = ((GLsizei *)(*env)->GetDirectBufferAddress(env, size)) + size_position;
	GLenum *type_address = ((GLenum *)(*env)->GetDirectBufferAddress(env, type)) + type_position;
	GLchar *name_address = ((GLchar *)(*env)->GetDirectBufferAddress(env, name)) + name_position;
	glGetTransformFeedbackVaryingEXTPROC glGetTransformFeedbackVaryingEXT = (glGetTransformFeedbackVaryingEXTPROC)((intptr_t)function_pointer);
	glGetTransformFeedbackVaryingEXT(program, index, bufSize, length_address, size_address, type_address, name_address);
}
Exemplo n.º 4
0
jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) {
	X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
	jlong *devices_address = ((jlong *)safeGetBufferAddress(env, devices)) + devices_position;
	GLXVideoCaptureDeviceNV *result;
	int i, elements;

	result = lwjgl_glXEnumerateVideoCaptureDevicesNV(peer_info->display, peer_info->screen, &elements);
	if ( devices_address != NULL ) {
		for ( i = 0; i < elements; i++ )
			devices_address[i] = (jlong)result[i];
	}
	XFree(devices);

	return elements;
}
Exemplo n.º 5
0
jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position) {
	X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
	const int *attrib_list_address = ((const int *)safeGetBufferAddress(env, attrib_list)) + attrib_list_position;

	return lwjgl_glXBindVideoDeviceNV(peer_info->display, video_slot, (unsigned int)video_device, attrib_list_address);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetShaderSourceARB(JNIEnv *env, jclass clazz, jint obj, jint maxLength, jobject length, jint length_position, jobject source, jint source_position, jlong function_pointer) {
	GLsizei *length_address = ((GLsizei *)safeGetBufferAddress(env, length)) + length_position;
	GLcharARB *source_address = ((GLcharARB *)(*env)->GetDirectBufferAddress(env, source)) + source_position;
	glGetShaderSourceARBPROC glGetShaderSourceARB = (glGetShaderSourceARBPROC)((intptr_t)function_pointer);
	glGetShaderSourceARB(obj, maxLength, length_address, source_address);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetAttachedObjectsARB(JNIEnv *env, jclass clazz, jint containerObj, jint maxCount, jobject count, jint count_position, jobject obj, jint obj_position, jlong function_pointer) {
	GLsizei *count_address = ((GLsizei *)safeGetBufferAddress(env, count)) + count_position;
	GLhandleARB *obj_address = ((GLhandleARB *)(*env)->GetDirectBufferAddress(env, obj)) + obj_position;
	glGetAttachedObjectsARBPROC glGetAttachedObjectsARB = (glGetAttachedObjectsARBPROC)((intptr_t)function_pointer);
	glGetAttachedObjectsARB(containerObj, maxCount, count_address, obj_address);
}
Exemplo n.º 8
0
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglTexImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalFormat, jint width, jint height, jint depth, jint border, jint format, jint type, jobject pixels, jint pixels_position, jlong function_pointer) {
	const GLvoid *pixels_address = ((const GLvoid *)(((char *)safeGetBufferAddress(env, pixels)) + pixels_position));
	glTexImage3DPROC glTexImage3D = (glTexImage3DPROC)((intptr_t)function_pointer);
	glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels_address);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBufferDataARB(JNIEnv *env, jclass clazz, jint target, jlong size, jobject data, jint data_position, jint usage, jlong function_pointer) {
	const GLvoid *data_address = ((const GLvoid *)(((char *)safeGetBufferAddress(env, data)) + data_position));
	glBufferDataARBPROC glBufferDataARB = (glBufferDataARBPROC)((intptr_t)function_pointer);
	glBufferDataARB(target, size, data_address, usage);
}