long long __startTime = 0;
bool __wait = false;
+bool __benchmark = false;
const char *__compare_prefix = NULL;
const char *__snapshot_prefix = NULL;
static void
checkGlError(void) {
- if (insideGlBeginEnd) {
+ if (__benchmark || insideGlBeginEnd) {
return;
}
if (!ref) {
return;
}
- if (verbosity)
+ if (verbosity >= 0)
std::cout << "Read " << filename << "\n";
}
if (__snapshot_prefix) {
char filename[PATH_MAX];
snprintf(filename, sizeof filename, "%s%04u.png", __snapshot_prefix, __frame);
- if (src.writePNG(filename) && verbosity) {
+ if (src.writePNG(filename) && verbosity >= 0) {
std::cout << "Wrote " << filename << "\n";
}
}
"Usage: glretrace [OPTION] TRACE\n"
"Replay TRACE.\n"
"\n"
+ " -b benchmark (no glgeterror; no messages)\n"
" -c PREFIX compare against snapshots\n"
" -db use a double buffer visual\n"
" -s PREFIX take snapshots\n"
if (!strcmp(arg, "--")) {
break;
+ } else if (!strcmp(arg, "-b")) {
+ __benchmark = true;
+ --verbosity;
} else if (!strcmp(arg, "-c")) {
__compare_prefix = argv[++i];
} else if (!strcmp(arg, "-db")) {
handle_names.add(handle.name)
print
- print 'unsigned verbosity = 0;'
+ print 'int verbosity = 0;'
print
self.retrace_functions(api.functions)