Jump to content

  • Log In with Google      Sign In   
  • Create Account


OpenGL 3.x/4.x static libraries?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 Asesh   Members   -  Reputation: 268

Like
0Likes
Like

Posted 15 October 2011 - 04:25 AM

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?

Sponsor:

#2 Brother Bob   Moderators   -  Reputation: 7746

Like
1Likes
Like

Posted 15 October 2011 - 04:38 AM

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.

#3 Asesh   Members   -  Reputation: 268

Like
0Likes
Like

Posted 15 October 2011 - 04:47 AM

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?

#4 Brother Bob   Moderators   -  Reputation: 7746

Like
1Likes
Like

Posted 15 October 2011 - 06:01 AM

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.

#5 Asesh   Members   -  Reputation: 268

Like
0Likes
Like

Posted 15 October 2011 - 06:25 AM

Thanks a lot :)

#6 GothSeiDank   Members   -  Reputation: 156

Like
1Likes
Like

Posted 15 October 2011 - 07:31 AM

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/

#7 V-man   Members   -  Reputation: 797

Like
0Likes
Like

Posted 15 October 2011 - 07:47 AM

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);

#8 Asesh   Members   -  Reputation: 268

Like
0Likes
Like

Posted 15 October 2011 - 08:08 AM

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

#9 GothSeiDank   Members   -  Reputation: 156

Like
1Likes
Like

Posted 15 October 2011 - 11:09 AM

@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/

#10 SimonForsman   Crossbones+   -  Reputation: 5720

Like
1Likes
Like

Posted 15 October 2011 - 01:08 PM

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)
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!

#11 V-man   Members   -  Reputation: 797

Like
2Likes
Like

Posted 16 October 2011 - 06:00 AM

OSX will support GL 3.2 according to apple. But that doesn't matter. You still need to link to a dll or whatever it is and I'm assuming that by default, it is 1.1 or 1.2.
If you need higher functions, you have to get function pointers.

I think the only different thing about OSX is that if you want gl 3.2, you can only make a forward compatible context.
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);




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS