" with other apitrace utilities for replay or analysis.\n"
"\n"
" -v, --verbose verbose output\n"
- " -a, --api=API specify API to trace (gl or egl);\n"
+ " -a, --api=API specify API to trace ("
+#ifdef _WIN32
+ "gl, d3d7, d3d8, d3d9, or d3d10"
+#else
+ "gl or egl"
+#endif
+ ");\n"
" default is `gl`\n"
" -o, --output=TRACE specify output trace file;\n"
" default is `PROGRAM.trace`\n";
api = trace::API_GL;
} else if (strcmp(optarg, "egl") == 0) {
api = trace::API_EGL;
+ } else if (strcmp(optarg, "d3d7") == 0) {
+ api = trace::API_D3D7;
+ } else if (strcmp(optarg, "d3d8") == 0) {
+ api = trace::API_D3D8;
+ } else if (strcmp(optarg, "d3d9") == 0) {
+ api = trace::API_D3D9;
+ } else if (strcmp(optarg, "d3d10") == 0) {
+ api = trace::API_D3D10;
} else {
std::cerr << "error: unknown API `" << optarg << "`\n";
usage();
const char *relPath;
const char *absPath;
+ /*
+ * TODO: simplify code
+ */
+
switch (api) {
case API_GL:
relPath = "wrappers/" GL_TRACE_WRAPPER;
absPath = APITRACE_WRAPPER_INSTALL_DIR "/" EGL_TRACE_WRAPPER;
break;
#endif
+#ifdef _WIN32
+ case API_D3D7:
+ relPath = "wrappers\\ddraw.dll";
+ absPath = APITRACE_WRAPPER_INSTALL_DIR "\\ddraw.dll";
+ break;
+ case API_D3D8:
+ relPath = "wrappers\\d3d8.dll";
+ absPath = APITRACE_WRAPPER_INSTALL_DIR "\\d3d8.dll";
+ break;
+ case API_D3D9:
+ relPath = "wrappers\\d3d9.dll";
+ absPath = APITRACE_WRAPPER_INSTALL_DIR "\\d3d9.dll";
+ break;
+ case API_D3D10:
+ relPath = "wrappers\\d3d10.dll";
+ absPath = APITRACE_WRAPPER_INSTALL_DIR "\\d3d10.dll";
+ break;
+#endif
default:
- std::cerr << "error: invalid API\n";
+ std::cerr << "error: unsupported API\n";
return 1;
}