Topic Options
Rate This Topic
#256858 - 04/30/09 02:32 AM Draft <GL3/gl3.h> released for feedback
Jon Leech (oddhack) Offline

Contributor
*****

Registered: 01/22/02
Posts: 80
Loc: Mt. View, CA
There's a draft <GL3/gl3.h> header in the Registry now, as described in appendix H.2 of the OpenGL 3.1 specification. This is not ready for general use yet, but we'd appreciate feedback from interested parties, particularly in terms of making it work with existing GL 3.1 implementations (getting feedback from Mesa/X.org folks is probably most critical in this regard).

Eventually it will be possible to just drop gl3.h in on top of a shipping GL3.1 implementation, but to get there we need to do some work on the calling conventions and other platform-specific stuff in the header before it's likely to work well on most platforms.

In terms of the interfaces provided, it should be pretty good, but I wouldn't be surprised if a couple of tokens and functions either should be there and are not (core 3.1 functionality), or shouldn't be there and are (removed functionality).

None of the preprocessor logic should be taken too seriously at this point other than GL_VERSION_3_1. Much of it is leftover from rewiring the glext.h generator scripts and there's no
reason to continue #defining GL_VERSION_3_0 (or previous), for example. There are also some extraneous typedefs, such as GLintptrARB, that are only meaningful with glext.h and will be removed soon.

It would be really helpful if feedback came by way of Khronos Bugzilla rather than in the forums, since TBH I am so swamped with internal Khronos stuff that I rarely have time to keep up with the forums. If you do provide feedback that way, please use product "OpenGL" component "Registry".
_________________________
Jon Leech
Khronos API Registrar
ARB Ecosystem TSG Chair
GL/EGL/GLES Spec Editor
...and suchlike

Top
#257364 - 05/12/09 11:58 AM Re: Draft <GL3/gl3.h> released for feedback [Re: Jon Leech (oddhack)]
soconne Offline
Regular Contributor

Registered: 08/12/03
Posts: 254
So does this mean extensions will automatically be bound correctly without user intervention? It seems some of them are listed in that header file.

Top
#257372 - 05/12/09 02:45 PM Re: Draft <GL3/gl3.h> released for feedback [Re: soconne]
martinsm Offline
Regular Contributor
*****

Registered: 03/23/07
Posts: 223
Loc: Latvia
No, it wont. But nobody stops writing you such functionality yourself. It is actually very simple.

Top
#257374 - 05/12/09 04:07 PM Re: Draft <GL3/gl3.h> released for feedback [Re: martinsm]
Ilian Dinev Offline
Frequent Contributor
****

Registered: 01/26/08
Posts: 966
Loc: Bulgaria
It's just a clean-up of gl.h . You simply add "3" to your "#include <gl\gl.h>" lines, and if your project followed the specs, it compiles and runs without errors.

Top
#257627 - 05/19/09 12:38 PM Re: Draft <GL3/gl3.h> released for feedback [Re: Ilian Dinev]
tamlin Offline
Regular Contributor

Registered: 03/12/05
Posts: 300
Jon,

while not directly related to the 3.1 parts, hitting the End key I just found the following (examples for discussion, glGetUniformIndices vs. PFNGLGETUNIFORMINDICESPROC).

Should it be related to a scripting/sed accident, let's leave it at that.

Are there any (valid, technical) reasons that:

- function prototypes are conditionally visible ("#ifdef GL3_PROTOTYPES"), but the function pointer typedefs are not (i.e. always)?

- function prototypes do NOT have the parameter names, but the function pointer typedefs have (isn't this opposite of what one would expect)?

Top
#261829 - 08/05/09 03:24 AM Re: Draft <GL3/gl3.h> released for feedback [Re: tamlin]
Jon Leech (oddhack) Offline

Contributor
*****

Registered: 01/22/02
Posts: 80
Loc: Mt. View, CA
Originally Posted By: tamlin
Are there any (valid, technical) reasons that:

- function prototypes are conditionally visible ("#ifdef GL3_PROTOTYPES"), but the function pointer typedefs are not (i.e. always)?


Yes. You cannot expect that the static entry points for anything in glext.h will be defined in the GL link library, in which case there's no utility in defining a bunch of prototypes for functions you can't call except through a function pointer. If you do have a platform that defines some of the extensions in the GL link library, then you probably also have a gl.h provided by the platform that defines those extension interfaces.

Quote:
- function prototypes do NOT have the parameter names, but the function pointer typedefs have (isn't this opposite of what one would expect)?


I don't think there's a valid technical reason, it's more an ancient legacy of the way the generator scripts were originally written at SGI 20-odd years ago persisting through many rewrites of the scripts. It could be changed and I occasionally find it a bit annoying myself, but OTOH it bulks up what's already an enormous header file even more and is a largely gratuitous change.
_________________________
Jon Leech
Khronos API Registrar
ARB Ecosystem TSG Chair
GL/EGL/GLES Spec Editor
...and suchlike

Top
#261844 - 08/05/09 04:35 AM Re: Draft <GL3/gl3.h> released for feedback [Re: Jon Leech (oddhack)]
Scribe Offline
Newbie
*

Registered: 11/30/07
Posts: 22
This isn't a great idea when considering multi-version libraries such as SDL as gl.h and gl3.h can't be compiled together. From this it's unlikely to find full adoption and may interfere with other APIs, is gl3.h really needed?

I would support the idea if it was more like GLEW and provided easy access to any core spec and extentions but otherwise I don't see a point.

Top
#279298 - 06/21/10 10:07 AM Re: Draft <GL3/gl3.h> released for feedback [Re: Scribe]
Craigor Offline
Newbie

Registered: 06/21/10
Posts: 1
It would be nice to see a more developer-oriented/user-friendly header. I can live with having to grab function pointers for what I want to use, but the main problem I and others have is in knowing _what_ to grab, especially now that the deprecation model is in place. A complete API listing for the different OGL versions would be a great step forward in solving this. I know a fair few people who've chosen DX over OGL for this very reason.

Originally Posted By: Scribe
I would support the idea if it was more like GLEW and provided easy access to any core spec and extentions but otherwise I don't see a point.

I also this comment! smile Even something like a #define to specify which version and profile of OGL your code wants support for would be fantastic. Then you could at least be 100% certain that you're not using any functionality that isn't included in the target version (e.g. deprecated/from newer OGL versions). There's far, far too much API-user-interpretation possible at the moment.

I think the very fact that libraries like GLEW exist to try and help with the confusion/uncertainty in using OGL these days is indicative of some fundamental problems. If I hadn't started with OGL back in the days when it was still extremely straightforward to use (circa '96), I'd probably have picked DX. Much, much more documentation, slightly better feature-set, and a lot simpler to set up correctly.

...Wow. I never thought I'd say that last phrase.
_________________________
...Is it _supposed_ to do that?

Top


Moderator:  barthold, Khronos_webmaster 
Search

Who's Online
4 registered (yeahdixon, CrazyBillyO, frank li, 1 invisible), 24 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Elias OpenGL, Jon Kristensen, tomastyv, sefiroths, trakof
25785 Registered Users
Top Posters (30 Days)
ZbuffeR 69
Dark Photon 64
Alfonse Reinheart 45
kRogue 44
ugluk 36
ei05tbe 29
Rosario Leonardi 26
davie 26
Ilian Dinev 24
Groovounet 24
carsten neumann 20
Aleksandar 19
Zarniwoop 19
DmitryM 19
Schnulla 18
Liufu 18
kowal 17
kyle_ 16
lobbel 16
NeXEkho 15
Forum Stats
25786 Members
13 Forums
54073 Topics
280436 Posts

Max Online: 482 @ 08/11/08 06:19 PM