Results 1 to 3 of 3

Thread: Count the GL functions used

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Posts
    6

    Count the GL functions used

    This is a little frivolous, but what the hell. I was curious to know the actual number of unique OpenGL API entry points I had referenced in a particular project, including extensions. Yes, this is useless information. Here's a command line I worked out. This works under Linux and OSX, and probably Cygwin.

    Code :
    grep -ho '\<gl[A-Z]\w*\>' *.cpp | sort | uniq | wc -l
    There were 89 in my project. Removing the wc bit lists them.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Count the GL functions used

    <pedantic mode on>
    you can (at least on linux) use "sort -u" instead of "sort | uniq " for higher performance

  3. #3
    Senior Member OpenGL Pro sqrt[-1]'s Avatar
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    1,000

    Re: Count the GL functions used

    Or if on windows you can use GLIntercept and get it from the runtime:

    http://www.opengl.org/discussion_boa...930;p=1#000008

    (assuming you call all functions you can use)

Similar Threads

  1. Replies: 9
    Last Post: 10-18-2014, 02:00 PM
  2. Built-in Functions: Work-Item Functions
    By sean.settle in forum OpenCL
    Replies: 7
    Last Post: 11-17-2011, 07:39 AM
  3. How to count objects I have...
    By Jinny in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-18-2002, 03:15 AM
  4. A Bit OT - Correct FPS Count
    By Aster in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 08-26-2001, 12:41 AM
  5. How to count frames?
    By Diapolo in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-13-2000, 02:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean