From: José Fonseca Date: Sun, 18 Sep 2011 09:31:04 +0000 (+0100) Subject: Document GREMEDY extension usage. X-Git-Url: https://git.cworth.org/git?p=apitrace;a=commitdiff_plain;h=e62cabcd8e99ecaabfc573082f5ba5f5975703aa Document GREMEDY extension usage. --- diff --git a/README.markdown b/README.markdown index f551ad2..f8b51ad 100644 --- a/README.markdown +++ b/README.markdown @@ -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 ----------------------------------