How to install OpenGL libraries linux - opengl

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

Related

Force Unreal Engine to use opengl on windows executable

I'm attempting to make a video game in Unreal Engine 4.9. I'm building it for Windows, but I'd like to have it use opengl instead of directx in the executable. However, I've found no options that let you do this. Unreal Engine uses OpenGL when it creates executables for Linux and Mac, but there seems to be no way to use OpenGL with Windows.
Am I missing something? Is there some way to force Unreal Engine to use OpenGL in Windows executables?
EDIT: The reason I want to use OpenGL is because I want this game to run without having to install anything on the end user's computer (DirectX has to be installed to work)
Microsoft doesn't really support OpenGL, they typically go out of their way to make it very difficult to use OpenGL on Windows and strongly encourage people to use DirectX instead.
The simplest way to get a working OpenGL context in windows is sometimes to use ANGLE which is a compatibility layer which translates OpenGL calls to DirectX calls. This is what Chrome and Firefox use to support WebGL on windows. I doubt that Unreal Engine is integrated with this, so you might have a hard time.
Edit:
EDIT: The reason I want to use OpenGL is because I want this game to run without having to install anything on the end user's computer (DirectX has to be installed to work)
One thing you could do is cross-compile the Mesa3D drivers, as described here: https://wiki.qt.io/Cross_compiling_Mesa_for_Windows
But then you won't get hardware acceleration.

Is there a built-in OpenGL GUI windowing library in XCode 6 (OS X 10.10)?

I am trying to develop a C++ application that uses OpenGL. I set up everything in XCode 6.4 (running on OS X 10.10.5) and I was able to get the OpenGL framework working. However, I can't figure out how to draw the graphics to a GUI window.
I know that GLUT is available, but it is deprecated and I'd rather avoid using it. Instead, is there a way of using some of Apple's native windowing systems (I assume there should be something available in the Cocoa API)?
I would rather avoid downloading additional libraries like SDL or Qt since I do not have root access on this machine and maintaining third-party libraries those may be challenging.

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 get an up-to-date OpenGL32.lib?

this one drives me crazy. I've been searching for two days but cant find any answer.
I want to develop some things with OpenGL 3 (or newer) with Visual Studio 2010 / C++.
The header and libraries provided by Microsoft are way too old to support OpenGL 3, so I'm trying to find newer versions. I easily found the header file in the OpenGL registry (http://www.opengl.org/registry/) but I cant find the OpenGL32.lib anywhere. How am I supposed to link a program without it?
There isn't a newer OpenGL library for windows, and there won't be. They decided to stop at OpenGL 1.1 and even call it a legacy graphics.
However, you can use load opengl function, and that is how people get access to the latest opengl features.
You can also use GLEW library to get access to the opengl functions.

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.