Ok, so I continued my adventures with Pyglet...

First of all, I cannot even run gl_info.py on my machine... it gives me the
same error...

I have a  Ubuntu 9.04 (i386 version) virual machine with my Fedora 11 x86_64
running as Guest, and Pyglet ran just fine (sluggish, but at least it ran)
on that machine... that made me become very mad!

So today I started debugging pyglet's code for my simple code:
    # -*- coding: utf-8 -*-
    import pyglet
    pyglet.options['shadow_window'] = False

#pyglet.window.get_platform().get_default_display().get_default_screen().get_best_config()
    window = pyglet.window.Window()

I started tracing the source code (using pdb) starting just before the
"window = pyglet.window.Window()" line on my code.
After slowly inspecting the code (and skipping other parts that I didn't
care for) I got to this lines in the
/usr/lib/python2.6/site-packages/pyglet/window/xlib/__init__py file (from
line line 265):
        if have_13:
            elements = c_int()
            configs = glx.glXChooseFBConfig(x_display, self._x_screen_id,
                attrib_list, byref(elements))
            if not configs:
                return []
When printing the value of configs I get:
<pyglet.gl.glx.LP_LP_struct___GLXFBConfigRec object at 0x16dc050>

But I saw that the debugger evaluated the "if not configs" line and then
returned []!
So, before the debugger returned from this level, I wrote this in the pdb
prompt:
(Pdb) not configs
And it printed "True" as a result!

What?! Inspected the config variable and then printed the only "normal"
attribute, "contents". printing configs.contents gave me the following:
*** ValueError: NULL pointer access

I think my error can be here... I don't have a clear idea on what I can do
next... whether this is a 64 bit issue or... a missing library... let me
paste the values of other maybe relevant variables in the local context:
attrs = [5, 1, 12, 24, 32786, True, 0, 0]
attrib_list = <pyglet.window.xlib.c_int_Array_8 object at 0x16dc200>
elements = c_int(0)
x_display = <pyglet.gl.glx.LP_struct__XDisplay object at 0x16e9cb0>
Although all those structs don't look so useful pasted here :D

Further comparisons with my Ubuntu virtualmachine gives me that the
self.display.info.get_server_version() returns different strings
'1.4' on Host Fedora
'1.3' on Guest Ubuntu
thus...
have_13 is True on Fedora and False on Ubuntu... so the path that is
executed by both machines is different... further comparisons will reveal
nothing :(...

So... err... any ideas guys?
Thank you,
Federico


2009/8/7 Federico Cáceres <[email protected]>

> Hi, I just downloaded and installed Pyglet 1.1.3 using setup.py on a
> Fedora 11 x86_64 with KDE 4.3.0 as desktop environment with python
> 2.6.
>
> I tried to run several of the demo files but always got an error when
> launching the script. For instance, for the following script:
> import pyglet
> window = pyglet.window.Window()
>
> I get this error:
> Traceback (most recent call last):
>  File "example.py", line 2, in <module>
>    window = pyglet.window.Window(config=config)
>  File "/usr/lib/python2.6/site-packages/pyglet/__init__.py", line
> 307, in __getattr__
>    __import__
> (import_name)
>  File "/usr/lib/python2.6/site-packages/pyglet/window/__init__.py",
> line 1684, in <module>
>    gl._create_shadow_window()
>  File "/usr/lib/python2.6/site-packages/pyglet/gl/__init__.py", line
> 491, in _create_shadow_window
>    _shadow_window = Window(width=1, height=1, visible=False)
>  File "/usr/lib/python2.6/site-packages/pyglet/window/xlib/
> __init__.py", line 474, in __init__
>    super(XlibWindow, self).__init__(*args, **kwargs)
>  File "/usr/lib/python2.6/site-packages/pyglet/window/__init__.py",
> line 643, in __init__
>    raise NoSuchConfigException('No standard config is available.')
> pyglet.window.NoSuchConfigException: No standard config is available.
>
>
> I would greatly appreciate if someone could point me out on what I
> could do to get Pyglet working on my computer.
>
> By the way, I have a NVIDIA 8600 GT and I am currently using NVIDIA's
> propietary drivers, version: 185.18.14.
>
> Cheers,
> Federico

--~--~---------~--~----~------------~-------~--~----~
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