Your application can programmatically set breakpoints when it is attached to OpenGL Profiler.
To set a breakpoint:
Include the CGLProfiler.h and CGLProfilerFunctionEnum.h header files in your application.
Declare an array of three GLint values, set to the following:
The function ID, as defined in the header file CGLProfilerFunctionEnum.h.
The logical OR of kCGLProfBreakBefore or kCGLProfBreakAfter, indicating how you want the breakpoint to stop—before entering the OpenGL function, on return from it, or both.
A Boolean that turns the breakpoint on or off.
Call the function CGLSetOption, passing the array as a parameter.
Listing 4-1 shows code that sets a breakpoint before the CGLFlushDrawable function.
Listing 4-1 Code that sets a breakpoint
#include "OpenGL/CGLProfiler.h" |
#include "OpenGL/CGLProfilerFunctionEnum.h" |
... |
GLint myBreakpoint[] = { kCGLFECGLFlushDrawable, kCGLProfBreakBefore, 1;} |
CGLSetOption( kCGLGOEnableBreakpoint, myBreakpoint ); |
... |
Last updated: 2008-02-08