Ejemplo n.º 1
0
static bool
test_vertex_attrib_format()
{
	bool pass = true;

	/* "The error INVALID_OPERATION is generated by VertexAttribFormat, ...
	 * if <type> is UNSIGNED_INT_10F_11F_11F_REV and <size> is not 3."
	 */

	glVertexAttribFormat(0, 3, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FALSE, 0);
	TEST("VertexAttribFormat-ok", GL_NO_ERROR);

	glVertexAttribFormat(0, 2, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FALSE, 0);
	TEST("VertexAttribFormat-badsize", GL_INVALID_OPERATION);

	glVertexAttribFormat(0, GL_BGRA, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FALSE, 0);
	TEST("VertexAttribFormat-badsize-bgra", GL_INVALID_OPERATION);

	/* "The error INVALID_ENUM is generated by VertexAttribIFormat,
	 * VertexAttribLFormat, ...
	 * if <type> is UNSIGNED_INT_10F_11F_11F_REV."
	 */

	glVertexAttribIFormat(0, 3, GL_UNSIGNED_INT_10F_11F_11F_REV, 0);
	TEST("VertexAttribIFormat-not-allowed", GL_INVALID_ENUM);

	glVertexAttribLFormat(0, 3, GL_UNSIGNED_INT_10F_11F_11F_REV, 0);
	TEST("VertexAttribLFormat-not-allowed", GL_INVALID_ENUM);

	return pass;
}
Ejemplo n.º 2
0
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_glVertexAttribLFormat(JNIEnv *__env, jclass clazz, jint attribindex, jint size, jint type, jint relativeoffset) {
    glVertexAttribLFormatPROC glVertexAttribLFormat = (glVertexAttribLFormatPROC)tlsGetFunction(910);
    UNUSED_PARAM(clazz)
    glVertexAttribLFormat(attribindex, size, type, relativeoffset);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexAttribLFormat(JNIEnv *__env, jclass clazz, jint attribindex, jint size, jint type, jint relativeoffset, jlong __functionAddress) {
	glVertexAttribLFormatPROC glVertexAttribLFormat = (glVertexAttribLFormatPROC)(intptr_t)__functionAddress;
	UNUSED_PARAMS(__env, clazz)
	glVertexAttribLFormat(attribindex, size, type, relativeoffset);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexAttribLFormat(JNIEnv *env, jclass clazz, jint attribindex, jint size, jint type, jint relativeoffset, jlong function_pointer) {
	glVertexAttribLFormatPROC glVertexAttribLFormat = (glVertexAttribLFormatPROC)((intptr_t)function_pointer);
	glVertexAttribLFormat(attribindex, size, type, relativeoffset);
}