#include <string.h>
+#include "os_binary.hpp"
#include "os_string.hpp"
#include "os_time.hpp"
#include "image.hpp"
bool double_buffer = true;
bool insideGlBeginEnd = false;
-trace::Parser parser;
glws::Profile defaultProfile = glws::PROFILE_COMPAT;
glws::Visual *visual[glws::PROFILE_MAX];
glws::Drawable *drawable = NULL;
long long endTime = os::getTime();
float timeInterval = (endTime - startTime) * (1.0 / os::timeFrequency);
- if (retrace::verbosity >= -1) {
+ if ((retrace::verbosity >= -1) || (retrace::profiling)) {
std::cout <<
"Rendered " << frame << " frames"
" in " << timeInterval << " secs,"
"Replay TRACE.\n"
"\n"
" -b benchmark mode (no error checking or warning messages)\n"
+ " -p profiling mode (run whole trace, dump profiling info)\n"
" -c PREFIX compare against snapshots\n"
" -C CALLSET calls to compare (default is every frame)\n"
" -core use core profile\n"
benchmark = true;
retrace::verbosity = -1;
glws::debug = false;
+ } else if (!strcmp(arg, "-p")) {
+ retrace::profiling = true;
+ retrace::verbosity = -1;
+ glws::debug = false;
} else if (!strcmp(arg, "-c")) {
compare_prefix = argv[++i];
if (compare_frequency.empty()) {
snapshot_frequency = trace::CallSet(trace::FREQUENCY_FRAME);
}
if (snapshot_prefix[0] == '-' && snapshot_prefix[1] == 0) {
+ os::setBinaryMode(stdout);
retrace::verbosity = -2;
}
} else if (!strcmp(arg, "-S")) {