Skip to content
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

create_standalone_context() fails in moderngl5 #173

Closed
alexgrabner opened this issue Mar 21, 2018 · 5 comments
Closed

create_standalone_context() fails in moderngl5 #173

alexgrabner opened this issue Mar 21, 2018 · 5 comments

Comments

@alexgrabner
Copy link

I just upgraded from release 4.2.2 to 5.0.4 and the standalone context creation is broken for me. I reverted to 4.2.2, where it works. Thanks for help in advance.

Ubuntu 16.04 64bit
Python 3.6.4

Input

import moderngl
ctx = moderngl.create_standalone_context()

Output

   3120     ctx = Context.__new__(Context)
-> 3121     ctx.mglo, ctx.version_code = mgl.create_standalone_context(settings)
   3122     ctx._screen = None
   3123     ctx.fbo = None

Error: cannot choose a visual info
@szabolcsdombi
Copy link
Member

szabolcsdombi commented Mar 21, 2018

Thank you for the report.

There were 3 implementation for standalone context on linux in ModernGL5 (X11 EGL OsMesa) unfortunately only X11 supports OpenGL 3.3+ so I restored the implementation from ModernGL4 that supports only X11.

python -m pip install "ModernGL>=5.0.5"

@alexgrabner
Copy link
Author

Thanks for the quick feedback, but the issue is still there for me. Any suggestion? Thanks.

X.Org version: 1.18.4
OpenGL version string: 4.6.0 NVIDIA 390.30

Input

import moderngl
print(moderngl.__version__)
ctx = moderngl.create_standalone_context()

Output

5.0.5
---------------------------------------------------------------------------
Error                                     Traceback (most recent call last)
...
   3120     ctx = Context.__new__(Context)
-> 3121     ctx.mglo, ctx.version_code = mgl.create_standalone_context(settings)
   3122     ctx._screen = None
   3123     ctx.fbo = None

Error: cannot choose a visual info

@szabolcsdombi
Copy link
Member

This is the only remarkable difference: f34af6a

please test with the master now:

python -m pip install https://github.com/cprogrammer1994/ModernGL/archive/master.zip

The problem does not occure on my computer. Please test it. It will help me a lot.

@alexgrabner
Copy link
Author

Now it works! Thanks!

@szabolcsdombi
Copy link
Member

This fix will be part of ModernGL 5.0.6 (will release today)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants