Example #1
0
void
piglit_init(int argc, char **argv)
{
	GLuint64EXT val = 1844674407370955165;

	piglit_require_extension("GL_ARB_bindless_texture");

	/* The ARB_bindless_texture spec says:
	 *
	 * "Interactions with NV_vertex_attrib_integer_64bit"
	 *
	 * "If NV_vertex_attrib_integer_64bit is not supported, this
	 *  extension inherits the {Get}VertexAttribL1ui64{v}ARB entry points
	 *  and UNSIGNED_INT64_ARB enum, as well as the functional edits
	 *  describing them. However, references to the uint64_t type in the
	 *  shader and providing 64-bit unsigned integer data to the shader
	 *  are removed."
	 */
	glVertexAttribL1ui64ARB(Index, val);
	if (!check_uint64_attrib(val, "glVertexAttribL1ui64ARB"))
		piglit_report_result(PIGLIT_FAIL);

	glVertexAttribL1ui64vARB(Index, &val);
	if (!check_uint64_attrib(val, "glVertexAttribL1ui64vARB"))
		piglit_report_result(PIGLIT_FAIL);

	piglit_report_result(PIGLIT_PASS);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglVertexAttribL1ui64vARB(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) {
	const GLuint64EXT *v_address = (const GLuint64EXT *)(intptr_t)v;
	glVertexAttribL1ui64vARBPROC glVertexAttribL1ui64vARB = (glVertexAttribL1ui64vARBPROC)((intptr_t)function_pointer);
	glVertexAttribL1ui64vARB(index, v_address);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglVertexAttribL1ui64vARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) {
    glVertexAttribL1ui64vARBPROC glVertexAttribL1ui64vARB = (glVertexAttribL1ui64vARBPROC)tlsGetFunction(1089);
    intptr_t v = (intptr_t)vAddress;
    UNUSED_PARAM(clazz)
    glVertexAttribL1ui64vARB(index, v);
}