On 12/12/12 22:52, Andre D wrote:
I suspect we should be saying

glx_context_id = self.glx_context.contents._opaque_struct if
self.glx_context.contents else -1

or something....

On Wed, Dec 12, 2012 at 5:46 PM, Andre D <[email protected]> wrote:
Looks like an OpenGL context is failing to be created (And we are not
detecting it correctly).  Do other opengl applications work? (Even if
not, we are detecting the failure incorrectly)

On Wed, Dec 12, 2012 at 9:23 AM, EvilGoatee <[email protected]> wrote:
I'm trying to get up and running with pyglet but kewp getting and error.

Here's the code:

import pyglet
from pyglet.gl import *
window = pyglet.window.Window()
glClearColor(0.2, 0.4, 0.5, 1.0)
@window.event
def on_draw():
     glClear(GL_COLOR_BUFFER_BIT)
     glColor3f(0, 0, 0)
     glBegin(GL_TRIANGLES)
     glVertex2f(200, 100)
     glVertex2f(200, 200)
     glVertex2f(100, 200)
     glVertex2f(300, 100)
     glVertex2f(300, 300)
     glVertex2f(100, 300)
     glEnd()
pyglet.app.run()


and here's the error:

  Traceback (most recent call last):
   File "test.py", line 2, in <module>
     from pyglet.gl import *
   File
"/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/__init__.py",
line 235, in <module>
     import pyglet.window
   File
"/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/window/__init__.py",
line 1811, in <module>
     gl._create_shadow_window()
   File
"/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/__init__.py",
line 205, in _create_shadow_window
     _shadow_window = Window(width=1, height=1, visible=False)
   File
"/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/window/xlib/__init__.py",
line 160, in __init__
     super(XlibWindow, self).__init__(*args, **kwargs)
   File
"/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/window/__init__.py",
line 516, in __init__
     context = config.create_context(gl.current_context)
   File
"/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/xlib.py",
line 186, in create_context
     return XlibContextARB(self, share)
   File
"/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/xlib.py",
line 300, in __init__
     super(XlibContext13, self).__init__(config, share)
   File
"/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/xlib.py",
line 197, in __init__
     glx_context_id = self.glx_context.contents._opaque_struct
ValueError: NULL pointer access

------------------
(program exited with code: 1)
Press return to continue

I'm on linuxmint 14 32bits

thanks.
Anybody care to open an issue on this? It might be a problem with an open-source video driver not supporting OpenGL.

--
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to