Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Setting a Breakpoint

Your application can programmatically set breakpoints when it is attached to OpenGL Profiler.

To set a breakpoint:

  1. Include the CGLProfiler.h and CGLProfilerFunctionEnum.h header files in your application.

  2. 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.

  3. 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 );
...


< Previous PageNext Page > Hide TOC


Last updated: 2008-02-08




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice