arifgursel / pyglet

Automatically exported from code.google.com/p/pyglet
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

pyglet/gl/glx_info.py:83 ppc mesa driver returns non int version string #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. get mac laptop, install linux, python, pyglet, mesa (no accel)
2. run example, crashes with "ValueError: invalid literal for int(): 4 Mesa 6"
3.

Paste in the traceback or error message:
$ PYTHONPATH=../.. python svg_test.py
Traceback (most recent call last):
  File "svg_test.py", line 295, in ?
    w = Window(width=1024, height=768)
  File "/usr/lib/python2.4/site-packages/pyglet/window/__init__.py", line
564, in __init__
    config = screen.get_best_config(config)
  File "/usr/lib/python2.4/site-packages/pyglet/window/__init__.py", line
297, in get_best_config
    configs = self.get_matching_configs(template)
  File "/usr/lib/python2.4/site-packages/pyglet/window/xlib/__init__.py",
line 172, in get_matching_configs
    have_13 = self.display.info.have_version(1, 3)
  File "/usr/lib/python2.4/site-packages/pyglet/gl/glx_info.py", line 83,
in have_version
    client = [int(i) for i in self.get_client_version().split('.')]
ValueError: invalid literal for int(): 4 Mesa 6

Paste in the output of tools/info.py:
root@pookie ui/pyglet/tools # python info.py 
Platform instance is <pyglet.window.xlib.XlibPlatform object at 0x3028e8b0>
Display instance is <pyglet.window.xlib.XlibDisplayDevice object at 0x30093210>
Screens:
  XlibScreen(screen=0, x=0, y=0, width=1024, height=768, xinerama=0)
Creating default context...
Traceback (most recent call last):
  File "info.py", line 25, in ?
    w = pyglet.window.Window(1, 1, visible=True)
  File "/usr/lib/python2.4/site-packages/pyglet/window/__init__.py", line
564, in __init__
    config = screen.get_best_config(config)
  File "/usr/lib/python2.4/site-packages/pyglet/window/__init__.py", line
297, in get_best_config
    configs = self.get_matching_configs(template)
  File "/usr/lib/python2.4/site-packages/pyglet/window/xlib/__init__.py",
line 172, in get_matching_configs
    have_13 = self.display.info.have_version(1, 3)
  File "/usr/lib/python2.4/site-packages/pyglet/gl/glx_info.py", line 83,
in have_version
    client = [int(i) for i in self.get_client_version().split('.')]
ValueError: invalid literal for int(): 4 Mesa 6

:)

Any additional info (platform/language/hardware) that may be relevant?

Version string is:
  1.4 Mesa 6.5.1
at line 83, glx_info.py (string returned from  get_client_version() )

Maybe change (in glx_info.py):

    def get_client_version(self):
        self.check_display()
        return glXGetClientString(self.display, GLX_VERSION)

to:

    def get_client_version(self):
        self.check_display()
        return glXGetClientString(self.display, GLX_VERSION).split()[0]

?

Original issue reported on code.google.com by cameron.blackwood on 29 Jul 2007 at 2:00

GoogleCodeExporter commented 9 years ago
The 'fixed' output of info.py is:

python info.py
Platform instance is <pyglet.window.xlib.XlibPlatform object at 0x3028e8b0>
Display instance is <pyglet.window.xlib.XlibDisplayDevice object at 0x30093210>
Screens:
  XlibScreen(screen=0, x=0, y=0, width=1024, height=768, xinerama=0)
Creating default context...
GL attributes:
double_buffer=c_long(1) stereo=c_long(0) buffer_size=c_long(24)
aux_buffers=c_long(0) sample_buffers=c_long(0) samples=c_long(0)
red_size=c_long(8) green_size=c_long(8) blue_size=c_long(8)
alpha_size=c_long(0) depth_size=c_long(24) stencil_size=c_long(0)
accum_red_size=c_long(0) accum_green_size=c_long(0)
accum_blue_size=c_long(0) accum_alpha_size=c_long(0)
GL version: 1.5 Mesa 6.5.1
GL vendor: Brian Paul
GL renderer: Mesa X11
GL extensions:
  GL_ARB_texture_compression GL_NV_point_sprite GL_EXT_polygon_offset
  GL_EXT_blend_color GL_EXT_blend_subtract GL_EXT_stencil_wrap
  GL_EXT_vertex_array GL_IBM_texture_mirrored_repeat GL_EXT_histogram
  GL_ATI_blend_equation_separate GL_ARB_depth_texture
  GL_NV_texture_rectangle GL_EXT_texture_object
  GL_EXT_blend_func_separate GL_EXT_texture GL_ARB_occlusion_query
  GL_SGI_color_table GL_ARB_transpose_matrix GL_ARB_texture_border_clamp
  GL_EXT_fog_coord GL_SGIX_shadow_ambient GL_ARB_texture_cube_map
  GL_EXT_blend_equation_separate GL_ARB_point_parameters
  GL_EXT_texture_env_dot3 GL_ATI_texture_env_combine3
  GL_EXT_multi_draw_arrays GL_SGIX_depth_texture
  GL_EXT_texture_env_combine GL_ARB_vertex_program
  GL_MESA_resize_buffers GL_ARB_texture_env_dot3 GL_EXT_bgra
  GL_SGIS_texture_edge_clamp GL_ATI_fragment_shader
  GL_ARB_texture_env_combine GL_ARB_vertex_buffer_object
  GL_EXT_shadow_funcs GL_EXT_convolution GL_MESA_program_debug
  GL_EXT_separate_specular_color GL_EXT_paletted_texture
  GL_EXT_texture_env_add GL_EXT_packed_depth_stencil
  GL_EXT_texture_mirror_clamp GL_EXT_timer_query
  GL_SGIS_texture_border_clamp GL_ARB_point_sprite GL_MESA_ycbcr_texture
  GL_EXT_framebuffer_object GL_ARB_half_float_pixel GL_ARB_draw_buffers
  GL_EXT_shared_texture_palette GL_NV_fragment_program
  GL_SGI_color_matrix GL_ATI_texture_mirror_once GL_IBM_rasterpos_clip
  GL_EXT_texture_sRGB GL_MESA_window_pos GL_SGIX_shadow
  GL_NV_texgen_reflection GL_IBM_multimode_draw_arrays
  GL_OES_read_format GL_EXT_clip_volume_hint
  GL_EXT_compiled_vertex_array GL_EXT_point_parameters
  GL_APPLE_vertex_array_object GL_ARB_vertex_shader
  GL_ARB_fragment_shader GL_ARB_imaging GL_ARB_fragment_program
  GL_ARB_shader_objects GL_ARB_shading_language_100 GL_NV_blend_square
  GL_EXT_secondary_color GL_ARB_texture_non_power_of_two
  GL_EXT_texture_lod_bias GL_ARB_shadow_ambient
  GL_EXT_pixel_buffer_object GL_EXT_abgr GL_NV_vertex_program
  GL_ARB_texture_rectangle GL_SGI_texture_color_table GL_ARB_multisample
  GL_SGIS_generate_mipmap GL_NV_light_max_exponent GL_EXT_blend_minmax
  GL_EXT_framebuffer_blit GL_INGR_blend_func_separate
  GL_ARB_texture_env_crossbar GL_SGIS_texture_lod GL_MESA_pack_invert
  GL_EXT_texture_rectangle GL_EXT_blend_logic_op GL_EXT_subtexture
  GL_EXT_texture_edge_clamp GL_ARB_window_pos GL_APPLE_packed_pixels
  GL_ARB_shadow GL_ARB_texture_mirrored_repeat GL_SUN_multi_draw_arrays
  GL_EXT_gpu_program_parameters GL_EXT_copy_texture
  GL_NV_vertex_program1_1 GL_EXT_texture3D GL_ARB_multitexture
  GL_EXT_depth_bounds_test GL_EXT_draw_range_elements
  GL_ARB_texture_env_add GL_EXT_packed_pixels GL_EXT_rescale_normal
  GL_ARB_pixel_buffer_object  
GLU version: 1.3              
GLU extensions:               
  GLU_EXT_nurbs_tessellator GLU_EXT_object_space_tess

Context is XlibGLContext()    
GLX is not direct             
GLX server vendor: Brian Paul 
GLX server version: 1.4       
GLX server extensions:        
  GLX_MESA_copy_sub_buffer GLX_MESA_pixmap_colormap
  GLX_MESA_release_buffers GLX_ARB_get_proc_address GLX_EXT_visual_info
  GLX_EXT_visual_rating GLX_SGIX_fbconfig GLX_SGIX_pbuffer
GLX client vendor: Brian Paul 
GLX client version: 1.4       
GLX client extensions:        
  GLX_MESA_copy_sub_buffer GLX_MESA_pixmap_colormap
  GLX_MESA_release_buffers GLX_ARB_get_proc_address GLX_EXT_visual_info
  GLX_EXT_visual_rating GLX_SGIX_fbconfig GLX_SGIX_pbuffer
GLX extensions:               
  GLX_MESA_copy_sub_buffer GLX_MESA_pixmap_colormap
  GLX_MESA_release_buffers GLX_ARB_get_proc_address GLX_EXT_visual_info
  GLX_EXT_visual_rating GLX_SGIX_fbconfig GLX_SGIX_pbuffer

Original comment by cameron.blackwood on 29 Jul 2007 at 2:02

GoogleCodeExporter commented 9 years ago
Thanks, fixed in r1070.

Original comment by Alex.Hol...@gmail.com on 29 Jul 2007 at 2:08