int rawbulk_check_enable(struct rawbulk_function *fn) { return check_enable_state(fn); }
int rawbulk_check_enable(struct rawbulk_function *fn) { C2K_NOTE("%s\n", __func__); return check_enable_state(fn); }
void piglit_init(int argc, char **argv) { GLint max_clip_planes; bool pass = true; GLint plane; GLboolean b; char enum_name[38]; GLenum enum_value; printf("Querying GL_MAX_CLIP_PLANES: "); glGetIntegerv(GL_MAX_CLIP_PLANES, &max_clip_planes); if (!piglit_check_gl_error(GL_NO_ERROR)) piglit_report_result(PIGLIT_FAIL); printf("%d\n", max_clip_planes); if (max_clip_planes < 0) { printf("Error: GL_MAX_CLIP_PLANES must be >= 0\n"); piglit_report_result(PIGLIT_FAIL); } /* Check behavior of GL_CLIP_PLANE0 + i where i < max_clip_planes */ for (plane = 0; plane < max_clip_planes; ++plane) { enum_value = GL_CLIP_PLANE0 + plane; sprintf(enum_name, "GL_CLIP_PLANE0 + %d", plane); pass = check_enable_state(enum_name, enum_value, false) && pass; printf("Trying glEnable(%s): ", enum_name); glEnable(enum_value); pass = piglit_check_gl_error(GL_NO_ERROR) && print_ok() && pass; pass = check_enable_state(enum_name, enum_value, true) && pass; printf("Trying glDisable(%s): ", enum_name); glDisable(enum_value); pass = piglit_check_gl_error(GL_NO_ERROR) && print_ok() && pass; pass = check_enable_state(enum_name, enum_value, false) && pass; } /* Check behavior of GL_CLIP_PLANE0 + n where n == max_clip_planes */ enum_value = GL_CLIP_PLANE0 + max_clip_planes; sprintf(enum_name, "GL_CLIP_PLANE0 + %d", max_clip_planes); printf("Trying glIsEnabled(%s): ", enum_name); b = glIsEnabled(enum_value); pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && pass; printf("Trying glGetBooleanv(%s): ", enum_name); glGetBooleanv(enum_value, &b); pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && pass; printf("Trying glEnable(%s): ", enum_name); glEnable(enum_value); pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && pass; printf("Trying glDisable(%s): ", enum_name); glDisable(enum_value); pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && pass; piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL); }