Compile with opengl 3.0 and mingw?

Hi,
actually, to compile an opengl application with opengl and glut, using mingw, is very easy, because opengl32.a, glut32.a etc…are included by default in mingw package: just link them and the application is compiled fine.

In the open source sw we are writing, we have used opengl features <= vers. 1.4, so the binary run fine on both old PCs and last generation PCs. In other words, I can compile it on a very old PC with poor integrated videocard, and then send it to my friend that run it using last NVIDIA card: amazing!

Now I’m a bit confusing about opengl3.0. I know they just deprecate, without delete, the old functions, but starting from 3.1 deprecated calls will be fully removed, so we need to study them. So my questions are:

  1. If I compile my application, using my usual opengl32.a and glut32.a on my old PC, and then I send the binary to be tested on ultimate video card that use opengl3.0 drivers, it run? If yes, it should print the deprecated functions, while running?

2)To compile my application using opengl3.0, I suppose I need some particular version of opengl32.a (or maybe it has a different name?). Where to find it? And probably I need to distribute a special opengl32.dll, right?

  1. Assuming I’m able to compile an opengl3.0. What happen if I send the binary to an old PC with an old video card? It will run in emulation mode, or it will not run at all?

Thanks! I hope this post will be useful for all developers that, as me, are confused by new version. Ah…please excuse me for the poor english: it’s not my primary language.

Best regards,

Manuel

First off, opengl32.a will not be changing and neither will OS files such as opengl32.dll
You can compile on Win95 with a very old compiler like Visual C++ 5 if you want and still run it on the latest OS, 64 bit, and the highest end GPU.

If you are interested in GL 3.0, have a look at WGL_ARB_create_context at http://www.opengl.org/registry

If there is no WGL_ARB_create_context, then you gently tell the user your system doesn’t support it and I can’t make a GL 3 context.

Thanks for reply.
Anyway I’m a bit confused. To have new 3.0 features I can use actual opengl32.a and no matter about opengl32.dll on users machines? This mean it’s all based on card drivers?

If you are interested in GL 3.0, have a look at WGL_ARB_create_context at http://www.opengl.org/registry

Sorry, but I’m not expert in extensions: I’ve always coded using “classic” opengl calls…so, excuse me for this trivial question: this mean 3.0 features are handled as extensions?? I just need to include some new headers in order to use opengl3.0?

Anyway, an important thing: I don’t need opengl3.0 specific features. I need that my actual application will be compatible with next opengl evolutions. This semplify the problem? Maybe it’s sufficient don’t use the deprecated calls, and continue to compile in the same way (with the same libraries and the same compiler options) as I already do?

If there is no WGL_ARB_create_context, then you gently tell the user your system doesn’t support it and I can’t make a GL 3 context.

So, it’s possible make a runtime switch? Or even choose to don’t use GL3 context by default, to be sure the app run even on older computers?

Thanks for the help.

Manuel

To have new 3.0 features I can use actual opengl32.a and no matter about opengl32.dll on users machines? This mean it’s all based on card drivers?

Yes. That’s how it has always been. You get function pointers for the non-GL 1.1 functions with wglGetProcAddress.

this mean 3.0 features are handled as extensions?? I just need to include some new headers in order to use opengl3.0?

Well, you have to get the function pointers, but basically yes. That’s how all OpenGL versions greater than 1.1 work.

Thanks…I’ve never used directly wglGetProcAddress…probably it’s included in freeglut.
To come back to my original question: I’ve an application that actually use features of opengl < 1.4. I must modify it in order to run with opengl3.x, not because I need opengl3.x features, but just because I want future releases of my application are opengl3.x compatible.

Initially, I thought the best way was to compile it with opengl3.0, so I’ve started this thread. But now it seem I can compile it in usual way, without need new opengl32.a or new dlls: Just removing deprecated calls.
It’s correct???

If not, please, can you suggest me the most correct (and, if possible, simple) procedure in order to be sure my open source application (http://www.makehuman.org) will run on next generation machines? Consider I use freeglut (it’s more convenient for multiplatform) and I know only the “classic” opengl calls.

Best regards,

Manuel

In short, I think it will be a fúcking mess.
Microsoft haven’t updated the opengl header files or library in what, 12 years, I really doubt they are going to start now.

Personally, I am ignoring ogl 3.0 for a while.

All existing OpenGL applications written for any version of OpenGL will continue to work on the next generation and for many many generations after that.
Depreciation will only remove old features if you specifically ask for a 3.1 context with a particular profile.
If you leave your program as it is, it will obtain a 2.1 context and all depreciated functions will still work.
You dont need to remove any depreciated functions unless you want your program to run faster.
You dont need to use OpenGL 3.0 unless you need to use the new integer shader support.

Thanks you very much, this is what I need to read. But it’s a your personal opinion, or there is (even minimal or just sketched, or just few lines) an official doc that talk about this?

Again, thanks.
This transition moment is not so simple.

Manuel

Here is the official position of NVIDIA, one of the two main providers of graphics hardware:
http://developer.nvidia.com/object/opengl_3_driver.html#faq
Section 3) clearly states that existing software will continue to work on all future hardware.

Remember that you are not the only one in this position, if anyone stopped suporting old OpenGL versions then none of the games or $1000 CAD programs that people already own would work anymore.
If a vendor removed support for old software then no-one would buy their hardware, so they have to continue to support OpenGL 2.1 for as long as people want to use 2.1 applications, and that could be 10 years or more.

Many Thanks!!

So, to close this thread in-topic with the title, this is what I’ve understand:


All OpenGL 1.x - OpenGL 2.x applications can be compiled with mingw (and with all other compilers) without changes (using the same headers and libraries too). They will continue to work on all future 3.x hardware.

Best regards,

Manuel

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