FreeGLUT or Mesa, which one should I use? - opengl

So as the title says, which one would you choose? It would be great if one can also explain the reasons behind.

FreeGLUT is a simplicistic framework for the creation of small OpenGL demos. Alternatives to FreeGLUT would be SDL, GLFW, or full blown frameworks like Qt.
Mesa is a open source implementation of the OpenGL API, and together with the DRI/DRM project drivers forms a full HW accelerated OpenGL implementation. If you're using Linux and use your GPU with open source drivers, Mesa is the OpenGL implementation you use. That's not a choice, that's a fact.
They're completely different things and neither can replace the other.

Related

Using Mesa3d with C++ in Ubuntu

I'm doing an OpenGL course but only have integrated graphics with my Intel processor. Upon doing some research it seems I can use the Mesa implementation of OpenGL with my integrated graphics.
On the installation page it says it requires python, but my course will be practicing OpenGL in a C++ environment.
I've also been looking at OpenGL tutorials online in C++, and there are many libraries used for simplifying common tasks in OpenGL. Will I be able to use these libraries with Mesa in C++, and if so, how would I approach this?

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.

Libraries for OpenGL

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.