Libraries for OpenGL - c++

I've read around that there is a lot of deprecation going on with OpenGL. I've heard this has to do with the implementation of shaders. Are there any libraries that are affected by this deprecation?
seems to suggest SFML, GLFW, and SDL as up to date libraries.
Do other libraries such as glew or glut have problems with the deprecation?

GLUT is the utility library which contains helpful methods mostly related to GUI. GLUT is outdated for something like 10 years already so it can't be used with the new (programmable) pipeline. From what I know it supports up to GL 3.1 inclusive only. The project which replaces GLUT is FREE GLUT which is up to date and can be used both with old and new OpenGL versions. Glew is the lib that exposes the GL API for windows users. It has both deprecated and current functionality. It is up to you which to use as it mostly depends on GL version and profile type you choose. If you use compatability profile for example in OpenGL 4.0 version then you can use mix of deprecated and 4.0 API specific functionality. But if you select Core profile then using deprecated methods will not work.

Related

Which version of Glut for OpenGL 1.1?

I am using legacy code that was written for OpenGL 1.1 (from the Windows SDK v7.0A), and uses Glut.
As Glut is not readilty available in the SDK, what version should I download ?
Update:
I tried with Glut 3.7, apparently the latest release (copyright up to 1998 ?), just to see, and it seems to work fine. Anyway, I couldn't find compatibility information anywhere...
You should never use the old GLUT. You should use FreeGLUT, which is backwards compatible with it. And FreeGLUT doesn't have restrictions on which OpenGL version you use (outside of adding support for core profiles and other profile parameters, but those are irrelevant to you).

Setting up modern OpenGL with Visual Studio 2013

I have been coding OpenGL for a while now using Java and LWJGL. However recently I decided that I would switch from Java to C++.
I managed to set up OpenGL with Visual Studio 2013, and had some fun with that. However I am used to using modern OpenGL (shaders, vbo's, vao's etc...), and I believe what I am looking for is OpenGL ES.
I have been using the GLFW library to create a window with OpenGL context, so how do I do this with OpenGL ES.
I tried adding the #define GLFW_INCLUDE_ES31 line to above the glfw3.h include, however then it cannot find the GLES3/gl31.h header file. I don't know how to obtain this file on my computer, because the GL/gl.h file was just on my computer by default.
Am I supposed to download it?
Apparently OpenGL ES is aimed at smartphones or less powerful devices, so I was wrong in thinking I wanted to use OpenGL ES. In that case, how can I use these newer functions within Visual Studio, and C++. At the moment I only seem to have access to OpenGL 1.1 functions.
You are lacking a loader (GLEW for example)
"just" add it to your project and you will be able to use the GL_ functions again

How to install OpenGL libraries linux

Where do I get the OpenGL libraries from? I am using fedora but I don't know what ones I need to get. Is it just:
sudo yum install freeglut-devel
I already have the g++ and stuff. Is there any other libraries I need to install to make a simple OpenGL application.
On various internet tutorials they are using glaux, glut etc...
Could someone advice on which one I should use. I need it to create a music visualization program.
At first you have to understand why freeglut libraries is used for, what is Opengl and which version of Opengl you are going to used. Glut is an outdated library and freeglut or GLFW is a best alternative. Freeglut/GLFW is used to create opengl window and provide many callback function to handle keyboard, mouse, joystick and timer. If you are using ancient version of opengl (version less than 2) then you can call the opengl API function just including freeglut/glut. But if you are using Modern Opengl version (upto latest version 4.x) you can't call the opengl API function just include freeglut because in modern version Opengl API function are called at run time rather than compile time. So,you need a library to handle run time access of Openg API function and best library is GLEW. In ancient version of Opengl math function like glScalef, glRotatef,glTranslatef are provided but these are absent in modern Opengl. You have to do your math by yourself or you can use GLM library to do math.
Don't use ancient version of OpenGL use modern OpenGL. You need following things to start modern opengl.
freeglut or GLFW library to create opengl window and handle keyboard,mouse, joystick and other things.
GLEW to access OpenGL API function at run time.
GLM to do math operation.
Don't get ahead of yourself stop following old tutorials. Here are the best modern OpenGL tutorials follow them.
Link 1
Link 2
Link 3

Qt C++ Library for Windows and OpenGL

I am trying to experiment with the Qt library on Windows. On their downloads page, I notice that the binaries built using VS2012 are available in two forms, with and without OpenGL. What exactly is the difference between the two? In the OpenGL version, do they have some special API implemented using OpenGL or does all of Qt rendering depend on OpenGL? Also, is there a version of Qt that uses DirectX?
#Raman: The opengl variant is using the desktop opengl version just like with Qt4.
The non-opengl variant is using angle, and you need to have that installed alongside the DirectX SDK to get it working. Angle is an adapter between the directx and the opengles API. Only the latter is support directly by Qt, but unfortunately directx drivers tend to work better on Windows than the opengl(es) ones. There are no plans to support a directx backend inside Qt, so we leave with Google's Angle work in that regard.
As for providing some extra bit, there was a discussion about it recently on the mailing list, that this decision should not be build time, but more like run time. However, no one has stood up just yet to make that work. Hopefully, that will change soon. It is causing confusion for the end users just like, so do not feel alone. ;-)
Hope this explanation helps.
DirectX is supported via the ANGLE based library.
Note that this has changed and as of Qt 5.5 the prebuilt binaries you can download from the Qt website are configured with the -opengl dynamic option. This is what #lpapp above was talking about. Qt defaults to choosing either native OpenGL drivers or ANGLE at run time now.
Qt internally uses OpenGL to render unless you specify otherwise now. You can also render custom OpenGL content using Qt's QOpenGLxxx functions and classes.
For a simple introduction to Qt and OpenGL that covers this and more click here.

Where to download opengl sdk (v. 3 or v. 4)?

Wikipedia says that OpenGl V4.x is the latest. However my Visual Studio 2012 just offers the following version
#define GL_VERSION_1_1 1
So my questions:
Which version is the most common that I should use? E.g. version 2.x because there are many tutorials, it is backward compatible etc.? I may have to mention that I normally prefer to write in C++, so is any version of Opengl e.g. offering namespaces? Are there huge differences between OpenGl 2,3 and 4?
And where can I get the Libs+Header files e.g. for OpenGl 4?
And where can I get the Libs+Header files e.g. for OpenGl 4?
You don't. OpenGL uses the so called "extension mechanism" to load functionality that's beyond the system ABI version. There exist third party libraries that do the extension loading and provide a header with the extended functionality.
Most popular is GLEW, which has its homepage at http://glew.sourceforge.net ; be warned though that right now of writing this GLEW is not up to date with OpenGL-3 and later core profiles. You must use compatibility profiles with GLEW or things get unstable.
AFAIK, the most popular GL development library is GLEW:
http://glew.sourceforge.net
There is no official OpenGL SDK. If you want to use newer functions you have to use a third party library such as GLEW or GLFW.