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

pyglet.gl.ContextException: Could not create GL context on Python3.4 #60

Open
phiresky opened this issue Apr 15, 2015 · 6 comments
Open

Comments

@phiresky
Copy link

Works flawlessly with python2, but with python3 this error appears:

> python3 main.py
Traceback (most recent call last):
  File "main.py", line 7, in <module>
    from pyglet.gl import *
  File "/usr/lib/python3.4/site-packages/pyglet/gl/__init__.py", line 236, in <module>
    import pyglet.window
  File "/usr/lib/python3.4/site-packages/pyglet/window/__init__.py", line 1816, in <module>
    gl._create_shadow_window()
  File "/usr/lib/python3.4/site-packages/pyglet/gl/__init__.py", line 205, in _create_shadow_window
    _shadow_window = Window(width=1, height=1, visible=False)
  File "/usr/lib/python3.4/site-packages/pyglet/window/xlib/__init__.py", line 163, in __init__
    super(XlibWindow, self).__init__(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/pyglet/window/__init__.py", line 515, in __init__
    context = config.create_context(gl.current_context)
  File "/usr/lib/python3.4/site-packages/pyglet/gl/xlib.py", line 186, in create_context
    return XlibContextARB(self, share)
  File "/usr/lib/python3.4/site-packages/pyglet/gl/xlib.py", line 300, in __init__
    super(XlibContext13, self).__init__(config, share)
  File "/usr/lib/python3.4/site-packages/pyglet/gl/xlib.py", line 203, in __init__
    raise gl.ContextException('Could not create GL context') 
pyglet.gl.ContextException: Could not create GL context
> uname -a 
Linux 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 GNU/Linux
@Aareon
Copy link

Aareon commented Oct 31, 2017

@phiresky, only guessing, but I assume between py2.7 and py3.x the API for pyglet changed. Honestly at this point, this repository is all but dead. A fork and port to py3 would be beneficial.

@progval
Copy link
Contributor

progval commented Oct 31, 2017

@Aareon It works for me on Python3.5.

@Aareon
Copy link

Aareon commented Oct 31, 2017

@phiresky @progval what graphics cards do y’all have? I’ve read some information about Nvidia cards not playing well with Pyglet/GL

@Aareon
Copy link

Aareon commented Oct 31, 2017

Could just be that your card doesn’t support the version of GL that it needs

@progval
Copy link
Contributor

progval commented Oct 31, 2017

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)

@airbus330300
Copy link

it doesn't work on python 3.8 know…

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

4 participants