GL 2.0 !

I’ve installed the latest nv drivers. GL version string outputs: 2.0.0.
It also seems to support FBO too (as the announce on the home page of this website).

Now, if I’m not wrong, that means we can get rid of all the extensions loading process, can’t we ?

Well, I’m gonna try that all.

Hope my post isn’t a mess…

Only if you don’t care about backwards compatibility and platform independance. Because on Windows you still have to load the 2.0 functions with the extension loading mechanism.

And although it works with direct linking, the recommended method of accessing >1.1 functions on any platform is AFAIK still the extension loading mechanism…

Originally posted by Overmind:

And although it works with direct linking, the recommended method of accessing >1.1 functions on any platform is AFAIK still the extension loading mechanism…

A better way is to use something like GLEW.

Okay, thanx a lot guys. So my way for loading extensions (as I called it once: the old way) is always the best way. Great. So, I’ll keep on getting the function addresses.

Overmind, why Windows users cannot use the extensions directly ? Is it only because W32 does not provide anything like GL_GLEXT_PROTOTYPES ?

Use glew. you can call the glewInit().
then you can use all OpenGL funcitons.

I have wrote a very simple program use the FBO and GLSL / MRT . it can compiled under both windows and linux.If you are a beginner . I think it maybe helpful for you.

http://xreal.51.net/Download/OpenGLFramWorks.zip

Originally posted by stanlylee:
[b]Use glew. you can call the glewInit().
then you can use all OpenGL funcitons.

I have wrote a very simple program use the FBO and GLSL / MRT . it can compiled under both windows and linux.If you are a beginner . I think it maybe helpful for you.

http://xreal.51.net/Download/OpenGLFramWorks.zip [/b]
It’s been years that I load gl extensions on my own and this forum helped me thought. My first intention when making this thread was to know if I could get rid of the extension loading process.
Now, I’d like to know why I could get rid of it under Linux, but why W32 users (and maybe others) won’t.

Hope that’s understandable.

> Now, I’d like to know why I could get rid of it under Linux, but why W32 users (and maybe others) won’t.

Because Microsoft controls the OpenGL32.dll and they don’t want to have an OpenGL version higher than 1.1 with all Windows PCs.

Originally posted by jide:
Overmind, why Windows users cannot use the extensions directly ? Is it only because W32 does not provide anything like GL_GLEXT_PROTOTYPES ?
Exactly.

But I wouldn’t recommend using GL_GLEXT_PROTOTYPES even on Linux, because you throw away the possibility to check the OpenGL version and at least output a user friendly error message when the functions are not defined.

I agree .you should check the extensions which you need to use .
for example. the GL_Draw_buffers(MRT) is not exported in the glGetString(EXT_STRING). but the entrypoint is available, in this situation, you can’t use the MRT. you should check the extension list.

Originally posted by PkK:
[b]> Now, I’d like to know why I could get rid of it under Linux, but why W32 users (and maybe others) won’t.

Because Microsoft controls the OpenGL32.dll and they don’t want to have an OpenGL version higher than 1.1 with all Windows PCs.[/b]
I knew that there were older version of gl on windows. But as for linux and Mesa, there’s the solution to use proprietary drivers. Isn’t that Nvidia (and such) providing latest gl drivers on windows just like on linux ??

Originally posted by Overmind:
[b] [quote]Originally posted by jide:
Overmind, why Windows users cannot use the extensions directly ? Is it only because W32 does not provide anything like GL_GLEXT_PROTOTYPES ?
Exactly.

But I wouldn’t recommend using GL_GLEXT_PROTOTYPES even on Linux, because you throw away the possibility to check the OpenGL version and at least output a user friendly error message when the functions are not defined.[/b][/QUOTE]Well, according to me, one can use GetString (GL_***) in order to know the version and the renderer. And regarding to them, one can choose the appropriate functions to use.

But you all might be right. I don’t know why I’d like to get rid of those extensions since I can load them and in a well manner :slight_smile:
I simply forgot that gl 2.0 doesn’t mean all implementations will have the same functionalities. For example, NV 2.0 will have NV extensions, but any potential ATI 2.0 will never have such extensions, but ATI ones.

Originally posted by stanlylee:
I agree .you should check the extensions which you need to use .
for example. the GL_Draw_buffers(MRT) is not exported in the glGetString(EXT_STRING). but the entrypoint is available, in this situation, you can’t use the MRT. you should check the extension list.

Is that Draw_buffers(MRT) an extension too ? I never heard about it. There might also have any reason this is not in the extension entry point, like an unofficial extension or maybe, worst, an unstable one.

I think you misunderstood me.

Of course there is OpenGL 2.0 in Windows. But you have to get the function pointers for any post 1.1 core function with wglGetProcAddress just like they were extension functions. You don’t check the extension string, you just check the version string for OpenGL >=2.0.

And on Linux you could use them directly, but you should do the same so you get the chance to check the GL_VERSION string and fall back to another method instead of getting a link error at program loading time…

The MRT extension is called ARB_draw_buffers and it is in the core since 2.0.

Right, I think I misunderstood you. So let me make another try in order to show that now I may have understand you :slight_smile:

So, in W32, you never check the extension strings but only the version string. Regarding this version, you can know which extensions to load and check with wglGetProcAddress.

Due to that, and for inter-operability, linux users should have the same behaviors, always loading the extensions. Right.

It’s been a while I didn’t program in W32 (and more long with gl on W32). So, what happens if I decide to check the extension string under this OS ? Does it give bad results ?

Ok for the MRT.

GL_Draw_buffers(_ARB) is a part of GL2.0.
and it is same function as GL_Draw_buffers_ATI

No.

If you want an extension you have to check the extension string. If you want a core function of OpenGL >1.1 you have to check the version string.

After you are sure the function exists (because either the extension is supported OR the OpenGL version is high enough), there is no difference between both, you just get the function pointer with wglGetProcAddress(…).

So every function that is core in OpenGL 2.0 can be loaded without checking the extension string, for everything else you still have to check it. But the loading mechanism itself is still the same…

Sorry for the confusion, I thought it was clear we are talking core functions only, but after re-reading my own posts I can understand that you are confused :wink:

Right, but everything wasn’t clear neither.

Anyway, thanks for the precisions. I feel better today :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.