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?
Related
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.
I want to use latest OpenGL features on Ubuntu. And I have installed mesa-common-dev but as far as I understand mesa does not support OpenGL 4.5 features. Also how can I use OpenGL via hardware without any API ?
Note :
glxinfo | grep "OpenGL version"
OpenGL version string: 4.5.13397 Compatibility Profile Context 15.20.1046
I want to use latest OpenGL features on Ubuntu. And I have installed mesa-common-dev but as far as I understand mesa does not support OpenGL 4.5 features.
All that matters is, that your actual OpenGL implementation supports the profile you want. The Linux ABI on OpenGL is pinned to OpenGL-1.2 (LSB5 has been released recently, so expect upcoming distribution releases to follow it, which bumped it to OpenGL-2.1).
Anything that goes beyond the ABI requirements is done through the extension mechanism. I.e. use load function pointers through …GetProcAddress and introduce new tokens with a glext.h. This processes has been repacked into OpenGL extension wrapper-loader libraries like GLEW.
The stuff mesa-common-dev provides is what's written down in the Linux LSB ABI specs… in a vendor neutral way, so you can compile your program using mesa-common-dev stuff, but it will work with the NVidia or AMD/ATI drivers as well.
Also how can I use OpenGL via hardware without any API ?
By definition you can't. OpenGL is an API. If you remove the API you remove OpenGL. If your intention is working the naked GPU on the bare metal, well, that would boil down to writing a full driver. In a few weeks/months Vulkan will be released and this gets you much closer to the GPU than OpenGL.
Upon successful compilation of a recent program I wrote from the openGL-book using openGL 4.0 I wasn't able to run the program due to an error that stated " error XX - unsupported hardware.."
However according to a previous question I asked if I could compile/run openGL programs on my computer I got an answer that I could:
Wiki claims you can do GL 4.0 with your HD 4000 [Graphics Chip] on Windows.
My question is - is that I am using the libraries freeglut 2.8 and GLEW 1.10 (newest versions) but the tutorial I followed used functions that came with 4.0 could the reason that my program does not run follow because I am linking modern versions of openGL libaries?
Things you have to check to run modern OpenGL:
Graphics driver: Do you have the latest and most up to date drivers?
Graphics card/chipset: Can your graphics hardware support the latest OpenGL even with its most recent drivers?
Using Proper Hardware: Some laptops come with a low powered graphics chipset and a high powered alternate graphics card/chipset. The low powered one may not support new stuff, but the high powered one definitely should. Have you instructed your computer to use the right one?
Libraries: Have you properly linked to something like GLEW that gives you the ability to use modern OpenGL?
Since you're on Windows, do note that they purposefully don't give you preinstalled access to modern OpenGL, so you have to do it yourself. Usually that just means checking your drivers and downloading GLEW.
From your error message, it looks like your graphics drivers aren't up to date or the graphics card/chipset/whatever you're using doesn't support the OpenGL version you want.
I am planning to use Ubuntu with QT Creator to study and develop OpenGL ES 2.x applications. it is obvious that OpenGL ES 2.x is not easy to be configured in desktop environment, and OpenGL ES is sub-specification of OpenGL.
So I want to know if it is possible to develop the core part of OpenGL ES 2.x application in OpenGL environment and move my code to android or iOS to develop GUI later?
Not easy to configure? I beg to differ. Just get an emulator like the one Mali has, and let your program use their libraries instead of system ones directly.
Then you can be pretty sure that the GL code should be fine, as long, of course, as you will manage to run it on iOS(Obj-C++?) or Android(NDK?).
Qt5 is built with OpenGL ES 2.0 by default, so if you use current Qt you will have it out of the box, also Qt developers tell that they will support both android and iPhone in 5.2 version.
Mesa implements both regular OpenGL and OpenGL ES: http://www.mesa3d.org/opengles.html.
OpenGL ES 3.0 is supported on select GPUs too, AFAIK.
There's also cross-API compatibility built into most OpenGL libraries, so you can compile and run OpenGL ES code with no or minimal changes. You do need to work out platform specifics like setting up a render context, framebuffers and doing the actual drawing. But this is not GL/GLES specific.
ES API compatibility has been around since OpenGL 3.2 with most calls supported. The remaining ones were added by the ARB_ES2_compatibility extension, which is part of OpenGL 4.1. OpenGL 4.2 adds full OpenGL ES 3.0 support.
And yes, it works well. I've been running the same ES code on both Android, Linux, Mac OS X and iOS myself. It just needs a little bit more work than single platform support.
I've a own engine which implements ES 2.0 on iOS and Windows, so its working on both systems. You just have to care about unsupported formats and methods ( like pvrtc which is not supported on windows, so i wrote a converter ).
To make it easy i first implement everything on iOS so i know its working, after that i porting it to windows. Currently i've just around 1000 Lines of code which differ on each platform ( But i'm using Xamarin ).
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.