-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preferring core profile when creating GL context #80
Comments
Hi, thanks for reporting. Similar thing was already done on OSX, so I just reenabled it also for other platforms. Should be fixed in 48e666e, hopefully I didn't break anything else. Please reopen if you find any issues. |
Instead of creating 3.0 context, why not create 3.3 context for mesa? Some magnum examples like motionblur still require 3.3 context |
As far as I know, creating 3.0 context means that minimal required version is 3.0, thus the implementation will create context with the most recent version that is still compatible with 3.0. If I would force the version to 3.3, it would cut off users with driver/hardware combination that supports only GL 3.0, 3.1 or 3.2. In their case the GL 2.1 fallback would be used, even though their system could handle newer versions. |
Hi mosra, the issue is still prevalent and commit didn't seem to fix the issue |
Renderer: Mesa DRI Intel(R) Haswell Mobile by Intel Open Source Technology Center |
GLX INFO: |
I get the same error as Swoorup on an Atom laptop regarding the Core profile 3.30. glxinfo snippet: OpenGL vendor string: Intel Open Source Technology Center OpenGL version string: 3.0 Mesa 11.1.0-devel (git-1c6689b 2015-10-01 trusty-oibaf-ppa) OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.1.0-devel (git-1c6689b 2015-10-01 trusty-oibaf-ppa) I think the selection of OpenGL profile chooses the wrong profile cause it picks the one with GLSL 1.30 instead of the profile which supports GLSL 3.30. So you'll need to provide a way to enumerate the profiles and pick the one that satisfies the GLSL version requirement. Or give us a way to create a context with the GLSL version we choose to use. |
Right, so this is not fixed at all. Sorry about that, I didn't have Mesa drivers installed to test the change on. From the output it doesn't even seem to print the
line, so I guess SDL2 is just not creating the core profile even though it is told to do so.
@ytain just ensuring that Core GL context is created would be enough to satisfy GLSL version requirements (the core 3.3 context would support GLSL 1.10 through 3.30). Briefly looking at the code, I think I found the problem. Can you try to change this line to say I can't test the change right now, sorry (maybe at the end of the weekend), so if someone can test this for me that would be very appreciated. Thanks. |
Can conform both works. Though now, profile just jumps to 3.3 The example binary now gives, With the picking example, I can only seem to rotate, clicking does not do any visible change at all. I'll dig in later |
Awesome, thanks for the quick test. Yes, it's expected to be at highest available GL version. Will try to push the fix as soon as possible. I had similar problems with the picking example (although on WebGL 2, some of the mentioned issues might be relevant to desktop GL too). "It worked on my NVidia", so I probably ran into some driver-specific implementation difference or used some more recent functionality by accident. |
Sorry for the delay. The fix is in a7661d7. Please reopen (again) if the issue (still) persists. Moving the discussion about broken example to mosra/magnum-examples#17. |
Aargh. Fuck this. I hate OpenGL. On NVidia the fix causes the version to be forced to GL 3.1, not the highest version available, which is completely useless behavior. Googling found some workaround from 2012. It's still not fixed yet? Unbelievable. It seems that the only solution is to:
Uglyy. |
I had that too. I use a optimus laptop and got the same result with nvidia. OpenGL implementation differs so vastly across different vendors. Then, I just created a OpenGL 3.3 context which worked. |
It seems that both NVidia and AMD are having the same problems -- specifying context version makes the driver use exactly that version and not any later comatible one, even though I think the specification allows it and Mesa is doing it -- if I specify core GL 3.1, it happily gives me 3.3 or any later version. So I may need to do the workaround also for AMD drivers, ugh. |
Finally got a machine with Mesa, confirming that this works for both EDIT: Workaround for AMD was added in 81f227b. |
By default with mesa drivers, the context is created in compatibility profile. For example, my mesa driver supports core profile of opengl 3.3 and compatability is set to 3.0.
Magnum does not consider this and thinks its using opengl 3.3 profile and error is thrown. Shown below is error from cubemap example.
The text was updated successfully, but these errors were encountered: