When building on Linux or Android with the exact same code (well, not with this context switch I'm adding now), everything worked perfectly. You see, Apple is terrible at updating their Video Backends (outside of Metal), Seeing how Their latest drivers (including Nvidias) only still support OpenGL 4.1 (and partially 4.2). The old way: gl::EnableVertexAttribArray (0) gl::BindBuffer (gl::ARRAYBUFFER, vbo) gl. I'm currently having a bit of trouble porting vertex arrays from the old OpenGL 3.3 way to the new OpenGL 4.3 way, as seen in Wolff's book on page 31. ) were not recognized (I had to switch to a pure Core profile glsl). This isn't a problem, as I follow OpenGL 3.3, and modify whenever my other resources introduce a new way. but my fbos still won't work ("missing attachment"), the display is all buggy and everything is very slow.įurthermore, I had to change all of my shaders because all of the keywords I used ("varying", "attribute". I thus tried to put my context switching code on top of paint() (very dirty, just a cheap temporary testing solution). Nice.īut if I look at it when I'm in paint(), it's a 2.1 context again and I can't create FBOs. Ok so I managed to switch context (I forgot Now if I print out the QOpenGLContext just after switching with my new one (I create it in the renderer's constructor) I have a core profile in its 4.1 version. Thank you for your reply (I had already read this article, very useful even if not exactly my case as I think this problem might be qtQuick/OSX specific). I then tried replacing the currentContext with a new one in the renderer (I store the * ctx = new 2.1 context with no profile, and if I print out the result of makeCurrent(), I get a beautiful "0", meaning it failed. I tried declaring a new f(QOpenGLContext::currentContext()->format()) į.setProfile(QSurfaceFormat::CoreProfile) į.setVersion(3,2) // I tried 3.0, 3.2, 3.3, 4.0, luck. (I'm just using the example code without any modification) If I print out the current QOpenGLContext format I can see the current version is still 2.1.
Well, kind of : the very simple example scene works flawlessly but it is because it doesn't need more than a 2.1 openGL context.
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.
So, for debugging purpose, I took the basic "OpenGL under QML": tutorial and tried it on my macbook to see if it works out of the box. My problem in Mac is about the OpenGL version detected. coreimage filter (GPU based image filtering on OSX) libdcadec removed. All of my shaders are rejected at compilation because they're made for a GLSL version greater than 3.0 (core profile). Both the ffplay and opengl output devices have been updated to support SDL2.
I have been trying to port my c++/qml/openGL project from linux to mac OS X 10.10 for several hours without any luck (it worked perfectly under linux).