Jump to content
  • Advertisement
Sign in to follow this  
Asesh

OpenGL OpenGL 3.x/4.x static libraries?

This topic is 2614 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
@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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!