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:
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?
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.
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.
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…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.
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.
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.
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.
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.