]> git.cworth.org Git - apitrace/commitdiff
Document GREMEDY extension usage.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 18 Sep 2011 09:31:04 +0000 (10:31 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 18 Sep 2011 09:31:04 +0000 (10:31 +0100)
README.markdown

index f551ad2f9cf9a69581d4b864d91261a750d014da..f8b51ad3c7eeddaea30c41caaf65496e7385f7a8 100644 (file)
@@ -97,6 +97,39 @@ Advanced command line usage
 ===========================
 
 
+Emitting annotations to the trace from GL applications
+------------------------------------------------------
+
+You can emit string and frame annotations through the
+[`GL_GREMEDY_string_marker`](http://www.opengl.org/registry/specs/GREMEDY/string_marker.txt)
+and
+[`GL_GREMEDY_frame_terminator`](http://www.opengl.org/registry/specs/GREMEDY/frame_terminator.txt)
+GL extensions.
+
+*apitrace* will advertise and intercept these GL extensions independently of
+the GL implementation.  So all you have to do is to use these extensions when
+available.
+
+For example, if you use [GLEW](http://glew.sourceforge.net/) to dynamically
+detect and use GL extensions, you could easily accomplish this by doing:
+
+    void foo() {
+    
+      if (GLEW_GREMEDY_string_marker) {
+        glStringMarkerGREMEDY(0, __FUNCTION__ ": enter");
+      }
+      
+      ...
+      
+      if (GLEW_GREMEDY_string_marker) {
+        glStringMarkerGREMEDY(0, __FUNCTION__ ": leave");
+      }
+      
+    }
+
+This has the added advantage of working equally well with gDEBugger.
+
+
 Dump GL state at a particular call
 ----------------------------------