Back to the OpenGL extension cross reference
GL_GREMEDY_string_marker
    GREMEDY_string_marker
Name Strings
    GL_GREMEDY_string_marker
Contributors
    Dirk Reiners
    Yaki Tebeka
Contact
    Dirk Reiners, Iowa State University (dreiners 'at' iastate.edu)
    Yaki Tebeka, Graphic Remedy (yaki 'at' gremedy.com)
Status
    Implemented by gDEBugger (Version 1.2.1)
Version
    Last Modified Date: February 1, 2005
    Author Revision: 1.2
Number
    311
Dependencies
    OpenGL 1.0 is required.
    
    The extension is written against the OpenGL 1.5 Specification.
Overview
    This extension defines a mechanism to insert textual markers into
    the OpenGL stream. 
    When debugging or profiling an OpenGL application some of the most
    important tools are stream loggers, which just output a list of the
    called OpenGL commands, and profilers, which show at which points
    the pipeline is bottlenecked for a given part of the frame. The
    problem in using these is that there is a definite loss of
    information between the application and the used debugger/profiler.
    The application generally has a pretty good idea what is rendered
    when (e.g. rendering background, landscape, building, players,
    particle effects, bullets etc.), but the debugger/profiler only
    sees the OpenGL stream. To analyze the stream developers have to
    guess what is done when by following the program code and the log
    output in parallel, which can get difficult for systems that
    restructure their internal pipeline or do lazy changes.
    This extension is really only useful for these debuggers and
    profilers, and not for actual drivers. In fact, it is not expected
    that any standard driver would ever implement this extension. The
    main point of having this extension is to allow applications to have a
    clean way of accessing this functionality only when they are run
    under the control of a debugger/profiler, without having to
    recompile or change the application.
IP Status
    No known IP claims
Issues
   (1) Should the extension use \0-terminated strings to simplify use?
    
    RESOLVED: no. 
    
    OpenGL so far doesn't use \0-terminated strings anywhere. Given
    that this is primarily a convenience extension it might make sense
    to use \0-terminated strings here, though. 
    
    However, we expect the actual call to the functions in this
    extension to be wrapped by a macro or convenience function anwyay,
    which would make it easy enough to calculate the length.
    The latest precendent for strings is the ProgramString(), which
    defines programs as a list of ubytes with explicit length. We'll
    use the same reasoning here and not use \0-terminated strings.
   (2) Should it be legal to call this inside Begin/End?
    
    RESOLVED: no.
    
    The benefit is questionable, and it would probably add
    overhead to a very critical path.
        
   (3) Should this be supported by GLX?
    
    UNRESOLVED
    
    Not strictly necessary, as most debugging is done locally. It would
    be cleaner, but I don't see a case for the effort. 
    
    
    void StringMarkerGREMEDY(sizei len, const void *string);
New Types
    None
    None
Additions to Chapter 2 of the OpenGL 1.5 Specification
(OpenGL Operation)
    None
Additions to Chapter 3 of the OpenGL 1.5 Specification (Rasterization)
    None
Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment
Operations and the Frame Buffer)
    None
Additions to Chapter 5 of the OpenGL 1.5 Specification
(Special Functions)
    Add section 5.7 on page 212
    
    5.7 Markers
    
    The command
    
        void StringMarkerGREMEDY(sizei len, const void *string);
    
    can be used to insert arbitrary marker strings into the command
    stream that can be recorded by appropriate debugging tools / porfiling tools /
    drivers. They have no influence on the rendered image or the OpenGL state.
    <string> is a pointer to the array of bytes representing the marker being
    inserted, which need not be null-terminated.  The length of the array is given
    by <len>.  If <string> is null-terminated, <len> should not include the terminator.
Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State
Requests)
    None
Additions to Appendix A of the OpenGL 1.5 Specification (Invariance)
    None
Additions to the AGL/EGL/GLX/WGL Specifications
    None
GLX Protocol
    None
Dependencies on EXT_extension_name
    None
Errors
    The error INVALID_OPERATION is generated if any of the commands
    defined in this extension is executed between the execution of Begin
    and the corresponding execution of End.
New State
    None
New Implementation Dependent State
    None
Sample Code
    None
Revision History
    1.2, 02/01/05 dr:   - Change the extension Status
                        - Change the name of the extension 
    1.1, 01/20/05 dr:     (Thanks to Yaki Tebeka for suggestions!)
                        - Switched to programString style
                        - renamed to marker_string  
    1.0, 01/17/05 dr:   - Initial revision
Implementation Support
   List of OpenGL implementations supporting the GL_GREMEDY_string_marker extension
Original File
   Original text file for the GL_GREMEDY_string_marker extension
Page generated on Sun Nov 20 18:40:43 2005