static void args(int argc, char *argv[]) { int i; for (i = 1; i < argc;) { if (graw_parse_args(&i, argc, argv)) { continue; } if (strcmp(argv[i], "-fps") == 0) { show_fps = 1; i++; } else if (i == argc - 1) { filename = argv[i]; i++; } else { usage(argv[0]); exit(1); } } if (!filename) { usage(argv[0]); exit(1); } }
static void args(int argc, char *argv[]) { int i; for (i = 1; i < argc;) { if (graw_parse_args(&i, argc, argv)) { continue; } exit(1); } }
static void options(int argc, char *argv[]) { int i; for (i = 1; i < argc;) { if (graw_parse_args(&i, argc, argv)) { continue; } if (strcmp(argv[i], "-e") == 0) { draw_elements = 1; i++; } else { i++; } } if (draw_elements) printf("Using pipe_context::draw_elements_instanced()\n"); else printf("Using pipe_context::draw_arrays_instanced()\n"); }