OpenGL 3.x/4.x static libraries?

Started by
9 comments, last by V-man 12 years, 6 months ago
Where can I get static libraries for OpenGL 3.x/4.x so that I can easily call the OpenGL functions just by linking to it w/o using wglGetProcAddress or GLEW?
Advertisement
As far as I'm aware, there are none.

You have to understand that, on Windows, there is typically only one OpenGL library that you use, which is Microsoft's own. Hardware drivers that you install just hook into that library to provide another implementation of the library. That is why you, no matter what hardware you have, always link against opengl32.lib and your program depends on opengl32.dll. Those files are provided by Microsoft, and not by your hardware driver. If you find a static library that provides OpenGL 3+, it is likely a software renderer, or tailored for a specific hardware.
So I have no other option but to use wglGetProcAddress or GLEW right? Don't driver manufacturers provide one? My laptop has Radeon HD 5730 and it does support OpenGL 4.1. I saw this tutorial: http://nehe.gamedev....oduction/25007/ and it doesn't use wglGetProcAddress but simply calls the APIs like glCreateShaderObjectARB. And one more question: I looked at that documentation of OpenGL 4.2 and there's no glCreateShaderObjectARB API but there is glCreateShader so does that mean glCreateShaderObjectARB is deprecated?

So I have no other option but to use wglGetProcAddress or GLEW right? Don't driver manufacturers provide one? My laptop has Radeon HD 5730 and it does support OpenGL 4.1.

No, there are no other options. As I said, you may find some software renderer or a library tailored specifically for some hardware, but I will not consider that an option here. The hardwrare manufacturers don't provide an OpenGL library, only what is effectively hooks into Microsoft's OpenGL library.

I saw this tutorial: http://nehe.gamedev....oduction/25007/ and it doesn't use wglGetProcAddress but simply calls the APIs like glCreateShaderObjectARB.

That tutorial explains how you use the shaders. Whether or not you have to load the functions, how you use the shaders doesn't change and that is what the tutorial is about.


And one more question: I looked at that documentation of OpenGL 4.2 and there's no glCreateShaderObjectARB API but there is glCreateShader so does that mean glCreateShaderObjectARB is deprecated?

Yes, you have to use the new API. There are some minor changes, but if you learn the idea of how to use shaders, then if the function is called glCreateShaderObjectARB or glCreateShader is mostly irrelevant for the purpose of learning.
Thanks a lot :)
Use gl3w.
It does the Job for you.
If you say "pls", because it is shorter than "please", I will say "no", because it is shorter than "yes"
http://nightlight2d.de/
There isn't any advantage to having a static library or a dll. MS provides GL 1.1 and that is something that will never change. Get use to using GLEW or any other function loader. People have been asking for a new lib and dll since GL 1.2 and that has been 11 years.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Thanks guys. What about on Linux and OS X? It's the same case with them too? Hopefully not. I am a Direct3D programmer and planning to move to OS X and Linux because I just hate Windows and don't want to use it any more
@V-Man
Glew is a bad idea for OpenGL 3 and 4 since it uses deprecated ways to get the extensions and causes Warnings.

@Asesh
GL3w works on Windows and Linux as far as I can see. Yes, it is the same case.
The python script generates a file dependant on your platform which you can include into your project.
If you say "pls", because it is shorter than "please", I will say "no", because it is shorter than "yes"
http://nightlight2d.de/

Thanks guys. What about on Linux and OS X? It's the same case with them too? Hopefully not. I am a Direct3D programmer and planning to move to OS X and Linux because I just hate Windows and don't want to use it any more


OS X doesn't support OpenGL 4 yet, Linux is pretty much the same as Windows if you use nvidia or intel gpus. (intel has had fairly weak OpenGL drivers on both platforms in the past though and i havn't bothered looking at their more recent offerings (There is a big risk that they still suck with anything other than D3D)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

This topic is closed to new replies.

Advertisement