PDA

View Full Version : How can I use OpenGL 4.3?



helloworld1234
08-18-2016, 02:25 AM
I wonder whether it is possible to use a newer / the newest OpenGL version for development or whether I fully depend on what version my graphics vendor supplies. I ask the question for my current system, but it's also of interest whether it would work on Linux machines.

I currently use a Mac Book Pro with Intel Iris. The Apple web site tells me that I have OpenGL 4.1, and the console tells me:



glxinfo | grep "OpenGL version"
OpenGL version string: 2.1 INTEL-10.14.73


(How) can I install and use OpenGL 4.3 for development? It's particularly important to have compute shaders. I plan to use it with the Python bindings pyopengl.

Silence
08-18-2016, 03:54 AM
Try Mesa: http://www.mesa3d.org/intro.html
You will need Mesa 12.0.1 to have OpenGL 4.3 functionalities. However, if your graphic card does not support it, you'll have to fallback to the software rasterizer.
Also, I'm not sure if there are any possibilities to use python.

mhagain
08-18-2016, 05:59 AM
You should also be aware that "fall back to the software rasterizer" typically means one frame per second - or less.

If that's acceptable for development, fair enough.

helloworld1234
08-19-2016, 02:45 AM
You will need Mesa 12.0.1 to have OpenGL 4.3 functionalities. However, if your graphic card does not support it, you'll have to fallback to the software rasterizer.
Also, I'm not sure if there are any possibilities to use python.

Is there a way to find out what my hardware would be able to support? Apple has this list with OpenGL versions (https://support.apple.com/en-us/HT202823), but I'm not sure whether this is the installed driver or the actual capability of the hardware.

In general, can we say that it is too early to use 4.3 (because of compute shaders) when I'd like to have some compatiblity with existing hardware? It's for research, but we'd like to use the program on different computers.

Silence
08-21-2016, 12:55 PM
Generally glxinfo gives what your drivers is providing... Maybe that could be different on your system however. If I'm not wrong, on Mac, you should generally have OpenGL 3.2 core profile minimum.
You can try the intel website with what "glxinfo | grep renderer" will return to you. Anyway, updating to the latest drivers will give you a good answer.
With that it mind, one other thing you could try is to make a simple test example with for example using sflm, sdl or any other libraries that will allow you to create easily a window with giving the version of OpenGL you want to run. Try 4.5 and see what will be returned...

For your second question, other people might answer you better than me... OpenGL 4.2 has been released in 2012. That's not so recent. Also, my old Geforce 560 can run OpenGL 4.5...

Finally, Intel never had good feedbacks regarding OpenGL support. On one recent laptop I have, I'm stuck with OpenGL 3.3 for example.

GClements
08-21-2016, 02:10 PM
In general, can we say that it is too early to use 4.3 (because of compute shaders) when I'd like to have some compatiblity with existing hardware? It's for research, but we'd like to use the program on different computers.
Ultimately, you need to decide which features are "necessary" and which features you can live without. The higher the required OpenGL version, the greater the proportion of hardware which won't support it.



OpenGL 4.2 has been released in 2012. That's not so recent.

That doesn't mean that any hardware released since then can support 4.2. Or even that all current hardware can support it.

Silence
08-22-2016, 12:53 AM
Ultimately, you need to decide which features are "necessary" and which features you can live without.

You might also consider using another library if compute shaders are not available. You might be interested in OpenCL (https://www.khronos.org/opencl/) for example.