From e62cabcd8e99ecaabfc573082f5ba5f5975703aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 18 Sep 2011 10:31:04 +0100 Subject: [PATCH] Document GREMEDY extension usage. --- README.markdown | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) 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 ---------------------------------- -- 2.43.0