]> git.cworth.org Git - apitrace/blobdiff - README.markdown
Keep info on how to manually retrace in a separate section.
[apitrace] / README.markdown
index 01fb8b66fcde25be18ba09cf041afe4b8f49e890..4954053d85d44f03b846e146fb538b7ee87577c4 100644 (file)
@@ -16,12 +16,12 @@ Basic usage
 ===========
 
 
-Linux
------
+Linux and Mac OS X
+------------------
 
 Run the application you want to trace as
 
-     LD_PRELOAD=/path/to/glxtrace.so /path/to/application
+    /path/to/apitrace trace /path/to/application [args...]
 
 and it will generate a trace named `application.trace` in the current
 directory.  You can specify the written trace filename by setting the
@@ -29,7 +29,7 @@ directory.  You can specify the written trace filename by setting the
 
 View the trace with
 
-    /path/to/tracedump --color application.trace | less -R
+    /path/to/apitrace dump --color application.trace | less -R
 
 Replay the trace with
 
@@ -43,6 +43,40 @@ Start the GUI as
     /path/to/qapitrace application.trace
 
 
+Windows
+-------
+
+* Copy `opengl32.dll`, `d3d8.dll`, or `d3d9.dll` from build/wrappers directory
+  to the directory with the application you want to trace.
+
+* Run the application.
+
+* View the trace with
+
+        \path\to\apitrace dump application.trace
+
+* Replay the trace with
+
+        \path\to\glretrace application.trace
+
+
+Advanced command line usage
+===========================
+
+
+Tracing manually
+----------------
+
+### Linux ###
+
+Run the application you want to trace as
+
+     LD_PRELOAD=/path/to/glxtrace.so /path/to/application
+
+and it will generate a trace named `application.trace` in the current
+directory.  You can specify the written trace filename by setting the
+`TRACE_FILE` environment variable before running.
+
 The `LD_PRELOAD` mechanism should work with most applications.  There are some
 applications, e.g., Unigine Heaven, which global function pointers with the
 same name as GL entrypoints, living in a shared object that wasn't linked with
@@ -62,13 +96,9 @@ to trace by using `glxtrace.so` as an ordinary `libGL.so` and injecting into
 See the `ld.so` man page for more information about `LD_PRELOAD` and
 `LD_LIBRARY_PATH` environment flags.
 
+### Mac OS X ###
 
-
-Mac OS X
---------
-
-Usage on Mac OS X is similar to Linux above, except for the tracing procedure,
-which is instead:
+Run the application you want to trace as
 
     DYLD_LIBRARY_PATH=/path/to/apitrace/wrappers /path/to/application
 
@@ -78,27 +108,6 @@ Note that although Mac OS X has an `LD_PRELOAD` equivalent,
 page for more details about these environment flags.
 
 
-Windows
--------
-
-* Copy `opengl32.dll`, `d3d8.dll`, or `d3d9.dll` from build/wrappers directory
-  to the directory with the application you want to trace.
-
-* Run the application.
-
-* View the trace with
-
-        \path\to\tracedump application.trace
-
-* Replay the trace with
-
-        \path\to\glretrace application.trace
-
-
-Advanced command line usage
-===========================
-
-
 Emitting annotations to the trace from GL applications
 ------------------------------------------------------