OpenGL detected in Mac OSX
I have a really strange issue happening here , and i dont know how to fix it.
In my code i use the QOpenGLContext class in this way:
mContext = new QOpenGLContext();
format = mContext->format();
the w is just a QWindow derived class to handle the render , keys and mouse behaviours.
My problem in Mac is about the OpenGL version detected.
If i run this code in Windows i get a OpenGL 4.3 (Properly detected) and all the system run fine, but now i compile the system in a MacBook Pro and when i run the system i get a 2.1 version of OpenGL.
When this happen at first time i think it was a OpenGLES being detected or used by the OS , but using the "isOpenGLES()" method of context class , it returns to me false...so informing the system are using OpenGL instead OpenGLES.
In the Mac Developer center i find a lista of OpenGL Drivers used by the machines and for my machine it uses an NVIDIA and HD 4000 boards supporting OpenGL 4.1.
Anyone there know why this are happening and how can i solve it?
Any help will be much appreciated!
Does it make any difference if you go to system preferences -> energy saver -> disable automatic graphics switching? (To "always use high performance graphics"). Just to rule out if the HD4000 is somehow holding back the supported level.
No, the same issue happen in both cases.
I disable the second cart thru this option and i try it using gfxcard app(where give to me the option to choose what card i want).
none option works, returning to me the same value (version 2.1 for OpenGL)...
That "article":http://www.kdab.com/opengl-in-qt-5-1-part-1/ might be of interest.
Hope it helps