Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: How can I find or create a list of 3.3-core core only functions?

  1. #1
    Intern Contributor
    Join Date
    Mar 2017
    Posts
    51

    How can I find or create a list of 3.3-core core only functions?

    Where can I find or create a list of core-only functions in the OpenGL 3.3 Core profile? Even with function loaders like GLAD, I'm considering trying to manually load the 3.3-core core-only functions for learning purposes.

    Looking at the 3.3 core spec, I've noticed that the core functions are mentioned throughout the spec. in bold, but I was wondering if there was a formatted list available somewhere that shows the core-only functions. I can't seem to find a list like that in the spec.

    Appendix J mentions extensions/header files, but doesn't have that type of list. It does say there that the registry contains gl.h and glext.h, which combined has all functions that you could possibly load, but looking at the header files, they also contain function prototypes for various versions of GL and extensions. I've seen something called ".spec" files in a few google searches. Will that help me?

    If there isn't an official list like that, are there any methods on creating that list of core-only functions besides just looking for bolded functions in the spec? gl.h and glext.h seem to be formatted in certain ways, but I'm not sure how exactly. I thought since glVertexAttribPointer was a core function in 3.3 core and not an extension function, it'd be in gl.h, but I'm finding it in glext.h, so I'm not totally sure how the functions are listed in those files.

  2. #2
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    5,932
    Quote Originally Posted by DragonautX View Post
    Where can I find or create a list of core-only functions in the OpenGL 3.3 Core profile? Even with function loaders like GLAD, I'm considering trying to manually load the 3.3-core core-only functions for learning purposes.
    What's wrong with using GLAD's ability to create 3.3 loaders?

    Quote Originally Posted by DragonautX View Post
    Looking at the 3.3 core spec, I've noticed that the core functions are mentioned throughout the spec. in bold, but I was wondering if there was a formatted list available somewhere that shows the core-only functions. I can't seem to find a list like that in the spec.
    Why would there be? The specification defines the functions for that specification. The OpenGL 4.6 specification describes OpenGL 4.6, not 3.3.

    Quote Originally Posted by DragonautX View Post
    Appendix J mentions extensions/header files, but doesn't have that type of list. It does say there that the registry contains gl.h and glext.h, which combined has all functions that you could possibly load, but looking at the header files, they also contain function prototypes for various versions of GL and extensions. I've seen something called ".spec" files in a few google searches. Will that help me?
    The gl.xml file can help you, but really, you should stick to version-specific loaders like GLAD. They do all of that work for you. Parsing through gl.xml and writing a loader is a lot of work, and it's work that has been done. Many times over.

  3. #3
    Intern Contributor
    Join Date
    Mar 2017
    Posts
    51
    There's nothing wrong with GLAD. I'm just curious what kinds of tools people would have used to make loaders like those. My first guess was that they would've just analyzed specifications manually, which was why I was wondering if maybe specifications contain a formatted list somewhere. I guess I was wrong about that.

    I was curious about trying it out myself, trying to make my own loader. I was wondering what type of work/tools it would take to do something like that. You mentioned something called gl.xml. I didn't know that existed before. I took a look at it at the KhronosGroup OpenGL-Registry repo, but ya, that looks pretty intense. I've never done XML parsing before either. I won't try it for now, I'll just make a note of it.

    I've done a little more research on the xml file, and I've noticed that it was designed to replace .spec files when it came to parsing data into header files. I know they're outdated now and not in the registry anymore, but I'm still curious what they looked like. Do you know where I can find a .spec file to look at? I tried googling "opengl spec file", but I can't find any of them.
    Last edited by DragonautX; 09-23-2017 at 04:54 PM. Reason: typo

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,524
    Current versions of the headers have 1.x functions in gl.h and the rest in glext.h. Functions are grouped by API version, so it's relatively easy to discard anything which was added after 3.3 or in an extension.

    However, there's no easy way to distinguish the functions from 2.1 which have since been relegated to the compatibility profile from those which are still present in the core profile. For that, you could process the index of the 4.x reference pages (which only list core profile functions), then find the intersection between the two sets.

  5. #5
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    5,932
    Quote Originally Posted by DragonautX View Post
    I was curious about trying it out myself, trying to make my own loader. I was wondering what type of work/tools it would take to do something like that. You mentioned something called gl.xml. I didn't know that existed before. I took a look at it at the KhronosGroup OpenGL-Registry repo, but ya, that looks pretty intense. I've never done XML parsing before either. I won't try it for now, I'll just make a note of it.

    I've done a little more research on the xml file, and I've noticed that it was designed to replace .spec files when it came to parsing data into header files. I know they're outdated now and not in the registry anymore, but I'm still curious what they looked like. Do you know where I can find a .spec file to look at? I tried googling "opengl spec file", but I can't find any of them.
    Why would you want them? They'd be horribly out of date. And as someone who wrote a parser for the .spec "format", the XML version is loads better.

    Really, the XML file is the only effective way to find this stuff.

  6. #6
    Intern Contributor
    Join Date
    Mar 2017
    Posts
    51
    Quote Originally Posted by Alfonse Reinheart View Post
    Why would you want them? They'd be horribly out of date. And as someone who wrote a parser for the .spec "format", the XML version is loads better.

    Really, the XML file is the only effective way to find this stuff.
    Like the idea about making a loader, it's more out of curiosity. I won't use them. I was wondering what it would've been like in the past to write a parser like that with .spec files. I was able to find them on my own after some searching, but thanks for the reply though.

  7. #7
    Intern Contributor
    Join Date
    Mar 2017
    Posts
    51
    Quote Originally Posted by GClements View Post
    Current versions of the headers have 1.x functions in gl.h and the rest in glext.h. Functions are grouped by API version, so it's relatively easy to discard anything which was added after 3.3 or in an extension.

    However, there's no easy way to distinguish the functions from 2.1 which have since been relegated to the compatibility profile from those which are still present in the core profile. For that, you could process the index of the 4.x reference pages (which only list core profile functions), then find the intersection between the two sets.
    -Thanks for the clarification. That makes sense, seeing the comments in glext.h. I thought gl.h contained only 1.1 functions for some reason, so I was a little confused there.

    -That's an interesting approach, using the reference pages like that. Thanks for the idea.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •