google-code-export / pyglet

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

window.WINDOW_INITIAL_FULLSCREEN crashes and borks subsequent tests #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
window.WINDOW_INITIAL_FULLSCREEN fails, and all subsequent tests run after
it also fail with the same error. This is with the ATI blob driver on
Ubuntu Edgy. 

  File "/home/anthony/projects/pyglet/pyglet/window/__init__.py", line 774,
in __init__
    self.create(factory)
  File "/home/anthony/projects/pyglet/pyglet/window/xlib/__init__.py", line
414, in create
    super(XlibWindow, self).create(factory)
  File "/home/anthony/projects/pyglet/pyglet/window/__init__.py", line 331,
in create
    self._config = factory.get_config()
  File "/home/anthony/projects/pyglet/pyglet/window/__init__.py", line 650,
in get_config
    configs = self.get_matching_configs()
  File "/home/anthony/projects/pyglet/pyglet/window/__init__.py", line 641,
in get_matching_configs
    return self._platform.create_configs(self)
  File "/home/anthony/projects/pyglet/pyglet/window/xlib/__init__.py", line
185, in create_configs
    return [XlibGLConfig10(display, screen, attrib_list)]
  File "/home/anthony/projects/pyglet/pyglet/window/xlib/__init__.py", line
263, in __init__
    raise XlibException('No conforming visual exists')
XlibException: No conforming visual exists

Original issue reported on code.google.com by anthonybaxter@gmail.com on 23 Dec 2006 at 8:36

GoogleCodeExporter commented 9 years ago

Original comment by anthonybaxter@gmail.com on 23 Dec 2006 at 8:40

GoogleCodeExporter commented 9 years ago

Original comment by anthonybaxter@gmail.com on 23 Dec 2006 at 8:42

GoogleCodeExporter commented 9 years ago
Could you please attach the output of tools/info.py?

Original comment by r1chardj0n3s on 23 Dec 2006 at 10:15

GoogleCodeExporter commented 9 years ago
GL attributes:
buffer_size=32 doublebuffer=1 stereo=0 red_size=8 green_size=8
blue_size=8 alpha_size=8 aux_buffers=0 depth_size=24 stencil_size=0
accum_red_size=0 accum_green_size=0 accum_blue_size=0
accum_alpha_size=0
GL version: 1.3.1091 (X4.3.0-8.27.6)
GL vendor: ATI Technologies Inc.
GL renderer: MOBILITY/RADEON 9000 DDR Generic
GL extensions:
  GL_ARB_multitexture GL_EXT_texture_env_add
  GL_EXT_compiled_vertex_array GL_S3_s3tc GL_ARB_occlusion_query
  GL_ARB_point_parameters GL_ARB_texture_border_clamp
  GL_ARB_texture_compression GL_ARB_texture_cube_map
  GL_ARB_texture_env_add GL_ARB_texture_env_combine
  GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3
  GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix
  GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program
  GL_ARB_window_pos GL_ATI_element_array GL_ATI_envmap_bumpmap
  GL_ATI_fragment_shader GL_ATI_map_object_buffer
  GL_ATI_texture_env_combine3 GL_ATI_texture_mirror_once
  GL_ATI_vertex_array_object GL_ATI_vertex_attrib_array_object
  GL_ATI_vertex_streams GL_ATIX_texture_env_combine3
  GL_ATIX_texture_env_route GL_ATIX_vertex_shader_output_point_size
  GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate
  GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint
  GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays
  GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal
  GL_EXT_secondary_color GL_EXT_separate_specular_color
  GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D
  GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map
  GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine
  GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic
  GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp
  GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array
  GL_EXT_vertex_shader GL_HP_occlusion_test GL_NV_blend_square
  GL_NV_occlusion_query GL_NV_texgen_reflection GL_SGI_color_matrix
  GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp
  GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod
  GL_SUN_multi_draw_arrays
GLU version: 1.3
GLU extensions:
  GLU_EXT_nurbs_tessellator GLU_EXT_object_space_tess

Context is XlibGLContext()
GLX is direct
GLX server vendor: SGI
GLX server version: 1.2
GLX server extensions:
  GLX_ARB_multisample GLX_EXT_visual_info GLX_EXT_visual_rating
  GLX_EXT_import_context GLX_EXT_texture_from_pixmap GLX_OML_swap_method
  GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_hyperpipe
  GLX_SGIX_swap_barrier GLX_SGIX_fbconfig GLX_MESA_copy_sub_buffer
GLX client vendor: ATI
GLX client version: 1.3
GLX client extensions:
  GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context
  GLX_ARB_get_proc_address GLX_ARB_multisample
  GLX_ATI_pixel_format_float GLX_ATI_render_texture
GLX extensions:
  GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context
 GLX_ARB_multisample

Original comment by anthonybaxter@gmail.com on 23 Dec 2006 at 11:12

GoogleCodeExporter commented 9 years ago

Original comment by anthonybaxter@gmail.com on 23 Dec 2006 at 11:13

GoogleCodeExporter commented 9 years ago
Please also attach output of glxinfo

Original comment by Alex.Hol...@gmail.com on 23 Dec 2006 at 11:25

GoogleCodeExporter commented 9 years ago
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe, 
    GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
client glx vendor string: ATI
client glx version string: 1.3
client glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_ATI_pixel_format_float, 
    GLX_ATI_render_texture
GLX version: 1.2
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context, 
    GLX_ARB_multisample
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: MOBILITY/RADEON 9000 DDR Generic
OpenGL version string: 1.3.1091 (X4.3.0-8.27.6)
OpenGL extensions:
    GL_ARB_multitexture, GL_EXT_texture_env_add, GL_EXT_compiled_vertex_array, 
    GL_S3_s3tc, GL_ARB_occlusion_query, GL_ARB_point_parameters, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, 
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, 
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat, 
    GL_ARB_transpose_matrix, GL_ARB_vertex_blend, GL_ARB_vertex_buffer_object, 
    GL_ARB_vertex_program, GL_ARB_window_pos, GL_ATI_element_array, 
    GL_ATI_envmap_bumpmap, GL_ATI_fragment_shader, GL_ATI_map_object_buffer, 
    GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once, 
    GL_ATI_vertex_array_object, GL_ATI_vertex_attrib_array_object, 
    GL_ATI_vertex_streams, GL_ATIX_texture_env_combine3, 
    GL_ATIX_texture_env_route, GL_ATIX_vertex_shader_output_point_size, 
    GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_func_separate, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint, 
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, 
    GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_rescale_normal, 
    GL_EXT_secondary_color, GL_EXT_separate_specular_color, 
    GL_EXT_stencil_wrap, GL_EXT_texgen_reflection, GL_EXT_texture3D, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map, 
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
    GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp, 
    GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_vertex_array, 
    GL_EXT_vertex_shader, GL_HP_occlusion_test, GL_NV_blend_square, 
    GL_NV_occlusion_query, GL_NV_texgen_reflection, GL_SGI_color_matrix, 
    GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp, 
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
glu version: 1.3
glu extensions:
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x23 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 Slow
0x24 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 Slow
0x25 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 Slow
0x26 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 Slow
0x27 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None
0x28 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None
0x29 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None
0x2a 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None
0x2b 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 Slow
0x2c 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 Slow
0x2d 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 Slow
0x2e 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 Slow
0x2f 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None
0x30 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None
0x31 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None
0x32 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None

Original comment by anthonybaxter@gmail.com on 24 Dec 2006 at 2:28

GoogleCodeExporter commented 9 years ago
Doesn't make any sense; there's no fullscreen-specific code for GLX, it just 
creates
a big window and bypasses the window manager (well after your failure).  Can you
confirm it fails in isolation, and that other window tests still work?

Original comment by Alex.Hol...@gmail.com on 24 Dec 2006 at 2:55

GoogleCodeExporter commented 9 years ago
Yep - by itself it fails:
beaker% python ./tests/window/WINDOW_INITIAL_FULLSCREEN.py
on_activate()
on_key_press(symbol=K_G, modifiers=MOD_NUMLOCK)
Leaving fullscreen.
E
======================================================================
ERROR: test_initial_fullscreen (__main__.WINDOW_INITIAL_FULLSCREEN)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/window/WINDOW_INITIAL_FULLSCREEN.py", line 48, in test_initial_fullscreen
    self.w.dispatch_events()
  File "/home/anthony/projects/pyglet/pyglet/window/xlib/__init__.py", line 800, in
dispatch_events
    event_handler(e)
  File "/home/anthony/projects/pyglet/pyglet/window/xlib/__init__.py", line 879, in
_event_key
    self.dispatch_event(EVENT_KEY_PRESS, symbol, modifiers)
  File "/home/anthony/projects/pyglet/pyglet/event.py", line 55, in dispatch_event
    ret = handler(*args)
  File "./tests/window/WINDOW_INITIAL_FULLSCREEN.py", line 32, in on_key_press
    self.w.set_fullscreen(False)
  File "/home/anthony/projects/pyglet/pyglet/window/__init__.py", line 407, in
set_fullscreen
    self.create(factory)
  File "/home/anthony/projects/pyglet/pyglet/window/xlib/__init__.py", line 421, in
create
    super(XlibWindow, self).create(factory)
  File "/home/anthony/projects/pyglet/pyglet/window/__init__.py", line 334, in create
    self._config = factory.get_config()
  File "/home/anthony/projects/pyglet/pyglet/window/__init__.py", line 666, in get_config
    configs = self.get_matching_configs()
  File "/home/anthony/projects/pyglet/pyglet/window/__init__.py", line 657, in
get_matching_configs
    return self._platform.create_configs(self)
  File "/home/anthony/projects/pyglet/pyglet/window/xlib/__init__.py", line 191, in
create_configs
    return [XlibGLConfig10(display, screen, attrib_list)]
  File "/home/anthony/projects/pyglet/pyglet/window/xlib/__init__.py", line 269, in
__init__
    raise XlibException('No conforming visual exists')
XlibException: No conforming visual exists

----------------------------------------------------------------------
Ran 1 test in 2.858s

FAILED (errors=1)

If I skip that test, all others work. If it runs, all tests after it fail with 
the
same error. It's not an exhausting of resources, I used the new --start-with 
option
to try running it at various points (e.g. 1st, 3rd, or whatever).

From IM yesterday between Richard and myself:
(19:23:29) Me: crap. it's glXChooseVisual() that's screwing up
(19:23:42) Richard/AIM: yeah, so probly one of the params is wrong
(19:24:22) Richard/AIM: I "ported" the params from the 1.3-compat config call 
down to
the glXChooseVisual call, there's a chance I got it wrong for fullscreen

This is using a GLX 1.2 driver. I added the following patch (to 
XlibGLConfig10.__init__)
@@ -263,6 +263,8 @@
         self._display = display
         self._screen = screen
         self._attrib_list = attrib_list
+        print "xx", self._display, screen._x_screen_id
+        print "yy", [x for x in attrib_list]
         self._visual_info = glXChooseVisual(self._display,
             screen._x_screen_id, self._attrib_list)
         if not self._visual_info:

Output is:
xx <ctypes.LP_c_void_p object at 0xb7d60bb4> 0
yy [5, 1, 12, 24, 4, 1, 0, 0]
on_activate()
on_key_press(symbol=K_G, modifiers=MOD_NUMLOCK)
Leaving fullscreen.
xx <ctypes.LP_c_void_p object at 0xb7cd8e3c> 0
yy [16, 0, 2, 32, 11, 8, 7, 0, 5, 1, 15, 0, 8, 8, 10, 8, 13, 0, 9, 8, 14, 0, 6, 
0,
17, 0, 3, 0, 12, 24, 4, 1, 0, 0]

That second attribute list looks a bit nuts to me.

I added this to dump it out:
@@ -263,6 +263,9 @@
         self._display = display
         self._screen = screen
         self._attrib_list = attrib_list
+        rattr = dict([(y,x) for x, y in _attribute_ids.items()])
+        for n, v in zip(list(attrib_list)[::2], list(attrib_list)[1::2]):
+            print "in", n, rattr.get(n,n), v
         self._visual_info = glXChooseVisual(self._display,
             screen._x_screen_id, self._attrib_list)
         if not self._visual_info:
@@ -274,6 +277,7 @@
             result = glXGetConfig(self._display,
                 self._visual_info, attr, byref(value))
             if result >= 0:
+                print "out", attr, name, value.value
                 self._attributes[name] = value.value

     def get_visual_info(self):

Output is then:
in 5 doublebuffer 1
in 12 depth_size 24
in 4 4 1
in 0 0 0
out 100000 sample_buffers 0
out 32 config_caveat 32768
out 36 transparent_index_value 0
out 16 accum_blue_size 0
out 2 buffer_size 32
out 11 alpha_size 8
out 7 aux_buffers 0
out 32786 x_renderable 0
out 40 transparent_alpha_value 0
out 100001 samples 1
out 39 transparent_blue_value 0
out 5 doublebuffer 1
out 15 accum_green_size 0
out 37 transparent_red_value 0
out 17 accum_alpha_size 0
out 8 red_size 8
out 32785 render_type 0
out 10 blue_size 8
out 13 stencil_size 0
out 9 green_size 8
out 14 accum_red_size 0
out 6 stereo 0
out 3 level 0
out 12 depth_size 24
out 35 transparent_type 32768
out 38 transparent_green_value 0
on_activate()
on_key_press(symbol=K_G, modifiers=MOD_NUMLOCK)
Leaving fullscreen.
in 16 accum_blue_size 0
in 2 buffer_size 32
in 11 alpha_size 8
in 7 aux_buffers 0
in 5 doublebuffer 1
in 15 accum_green_size 0
in 8 red_size 8
in 10 blue_size 8
in 13 stencil_size 0
in 9 green_size 8
in 14 accum_red_size 0
in 6 stereo 0
in 17 accum_alpha_size 0
in 3 level 0
in 12 depth_size 24
in 4 4 1
in 0 0 0
E
======================================================================
ERROR: test_initial_fullscreen (__main__.WINDOW_INITIAL_FULLSCREEN)

I "if False"'d out the code that resets self._attributes (the second half of the
__init__ method) and the glXChooseVisual works - so it's that the second call is
passing in a huge list of attributes.

With that code if False'd out, I then get a good'ol'regular
X Error of failed request:  BadValue (integer parameter out of range for 
operation)
  Major opcode of failed request:  144 (ATIFGLRXDRI)
which suggests that the first context or some other resource isn't being free'd 
up
correctly (that's usually been the problem when we've seen this error before).

Original comment by anthonybaxter@gmail.com on 24 Dec 2006 at 4:19

GoogleCodeExporter commented 9 years ago
This patch should fix the X error (when you brutalise away the attributes):

Index: pyglet/window/xlib/__init__.py
===================================================================
--- pyglet/window/xlib/__init__.py      (revision 311)
+++ pyglet/window/xlib/__init__.py      (working copy)
@@ -412,6 +412,8 @@
         # This would prevent the floating window from being moved by the
         # WM.
         if self._window and factory.get_fullscreen() != self._fullscreen:
+            glFlush()
+            glXMakeCurrent(self._display, 0, 0)
             if self._glx_window:
                 glXDestroyWindow(self._display, self._glx_window)
             xlib.XDestroyWindow(self._display, self._window)

The final unnamed attribute in your list (in 4 4 1) is actually GLX_RGBA 
followed by
GLX_USE_GL.  Both are boolean and supported in GLX 1.0, so they shouldn't be a
problem.  All the others also look reasonable given the glxinfo output.  See if 
you
can find the exact attribute(s) that's killing it.

Original comment by Alex.Hol...@gmail.com on 24 Dec 2006 at 4:38

GoogleCodeExporter commented 9 years ago
This patch should fix the X error (when you brutalise away the attributes):

Index: pyglet/window/xlib/__init__.py
===================================================================
--- pyglet/window/xlib/__init__.py      (revision 311)
+++ pyglet/window/xlib/__init__.py      (working copy)
@@ -412,6 +412,8 @@
         # This would prevent the floating window from being moved by the
         # WM.
         if self._window and factory.get_fullscreen() != self._fullscreen:
+            glFlush()
+            glXMakeCurrent(self._display, 0, 0)
             if self._glx_window:
                 glXDestroyWindow(self._display, self._glx_window)
             xlib.XDestroyWindow(self._display, self._window)

The final unnamed attribute in your list (in 4 4 1) is actually GLX_RGBA 
followed by
GLX_USE_GL.  Both are boolean and supported in GLX 1.0, so they shouldn't be a
problem.  All the others also look reasonable given the glxinfo output.  See if 
you
can find the exact attribute(s) that's killing it.

Original comment by Alex.Hol...@gmail.com on 24 Dec 2006 at 4:39

GoogleCodeExporter commented 9 years ago
That patch does make it work (with the attribute setting whacked on the back of 
the
head). Now working through the attributes to figure out which one is at fault.

Original comment by anthonybaxter@gmail.com on 24 Dec 2006 at 8:13

GoogleCodeExporter commented 9 years ago
It's "stereo". Patch (along with previous one you posted) makes it all happy.

@@ -270,6 +271,7 @@

         self._attributes = {}
         for name, attr in _attribute_ids.items():
+            if name == 'stereo': continue
             value = c_int()
             result = glXGetConfig(self._display,
                 self._visual_info, attr, byref(value))
@@ -412,6 +414,8 @@
         # This would prevent the floating window from being moved by the
         # WM.
         if self._window and factory.get_fullscreen() != self._fullscreen:
+            glFlush()
+            glXMakeCurrent(self._display, 0, 0)
             if self._glx_window:
                 glXDestroyWindow(self._display, self._glx_window)
             xlib.XDestroyWindow(self._display, self._window)

Googling for "ATI GLX_STEREO", it looks like ATI and visual selection is a bit 
of a
problem child. (Like so much else on ATI). 

With this patch in place, current SVN passes all tests except for
window.WINDOW_SET_VSYNC. I won't check it in, because I'm not sure if you want 
to
make it only on ATI or something. I'd suspect it's probably fine to do it this 
way,
because if you want stereo explicitly, there are other ways to do it.

God I hate ATI's blob driver. Open source, you stupid bastards.

Original comment by anthonybaxter@gmail.com on 24 Dec 2006 at 8:42

GoogleCodeExporter commented 9 years ago
FWIW, according to Richard it's unlikely that VSYNC could work on this driver,
because GLX_SGI_swap_control isn't supported.

So that aside (maybe the XlibWindow.set_vsync() method should detect that it's
missing and instead raise a nice message or something), all tests are passing.
Woooooo. Nice work.

Original comment by anthonybaxter@gmail.com on 24 Dec 2006 at 8:51

GoogleCodeExporter commented 9 years ago
Is there a chance we're just not passing the correct value for stereo and ATI 
is 
being picky where other drivers are not?

Vsync doesn't use GLX_SGI_swap_control any more, we use GLX_SGI_video_sync. 
Which 
ATI also doesn't support ;)

Aside: I'm not too keen on the current implementation of checking for being 
able to 
use that extension. Currently the code assumes support when the 
glXGetVideoSyncSGI 
and glXWaitVideoSyncSGI symbols are exported from the driver, but there's 
always a 
chance (a slim one, sure) that those symbols are exported but the driver 
doesn't 
support the extension. I'd prefer that we perform an actual check to see 
whether 
the driver says it supports GLX_SGI_video_sync...

Original comment by r1chardj0n3s on 24 Dec 2006 at 9:28

GoogleCodeExporter commented 9 years ago
I've checked in r313 to fix that flushing of the context when the window is 
destroyed. I've also searched for other places we destroy the window and I'm 
pretty 
sure we've caught both of them now.

Original comment by r1chardj0n3s on 24 Dec 2006 at 9:32

GoogleCodeExporter commented 9 years ago
mentioned to richard that the last para of comment 15 is correct:
beaker% nm /usr/lib/libGL.so| grep glXGetVideoSyncSGI
00075ce0 T glXGetVideoSyncSGI
beaker% nm /usr/lib/libGL.so| grep glXWaitVideoSyncSG
00075cf0 T glXWaitVideoSyncSGI
but no vsync.

Original comment by anthonybaxter@gmail.com on 24 Dec 2006 at 9:44

GoogleCodeExporter commented 9 years ago
Yep that's because you have the client/server mismatch in GLX.  Yes, we should 
be
checking extensions properly.. that goes for all of them, not just this one.

On Windows a warning is emitted if the extension isn't present, we can do the 
same in
GLX easily enough.

Can we think of a good way to conditionally enable workarounds for certain 
drivers? 
There's no way I can think of to detect that GLX_STEREO is going to fail.  
Perhaps
check (hypothetical) ('ATI' in pyglet.window.xlib.GLX.info.version)?

Original comment by Alex.Hol...@gmail.com on 24 Dec 2006 at 10:07

GoogleCodeExporter commented 9 years ago
Is there a reason to want to keep the GLX_STEREO result from the visual? Surely 
if
someone actually wants it, they could add it explicitly? Or you could check for 
the
no matching visual case, and if there's a GLX_STEREO in there, remove it and 
try again? 

Otherwise, I guess there could be some sort of pyglet.driverhacks module that
contains all the settings for particular driver oddities? At the moment, it 
seems
like the ATI driver is the one that most needs it, but I'm sure there will be 
more in
future. 

Original comment by anthonybaxter@gmail.com on 25 Dec 2006 at 7:11

GoogleCodeExporter commented 9 years ago
Results are kept so the context is likely to still be valid (or at least 
shareable)
when recreating the window.

r317 refactors things a bit and includes an ATI/GLX1.0 check that removes 
stereo.  If
this works for you, by my count you don't need any more patches?

Original comment by Alex.Hol...@gmail.com on 25 Dec 2006 at 9:26

GoogleCodeExporter commented 9 years ago
Nope, it's completely broken now:
Press return to begin test...
INFO:root:Begin unit tests for window.WINDOW_INITIAL_FULLSCREEN
X Error of failed request:  GLXBadDrawable
  Major opcode of failed request:  143 (GLX)
  Minor opcode of failed request:  11 (X_GLXSwapBuffers)
  Serial number of failed request:  54
  Current serial number in output stream:  54

Original comment by anthonybaxter@gmail.com on 26 Dec 2006 at 2:00

GoogleCodeExporter commented 9 years ago
Ok sorry about that.  Fixed a typo, should work in r318.

Original comment by Alex.Hol...@gmail.com on 26 Dec 2006 at 3:24

GoogleCodeExporter commented 9 years ago
back to 
    raise XlibException('No conforming visual exists')
XlibException: No conforming visual exists

Original comment by anthonybaxter@gmail.com on 26 Dec 2006 at 4:47

GoogleCodeExporter commented 9 years ago
Fixed in r319. Had to use client_vendor, not server_vendor (see earlier glxinfo 
output)
server glx vendor string: SGI
client glx vendor string: ATI
OpenGL vendor string: ATI Technologies Inc.

Original comment by anthonybaxter@gmail.com on 26 Dec 2006 at 7:35

GoogleCodeExporter commented 9 years ago
Closing issue

Original comment by Alex.Hol...@gmail.com on 26 Dec 2006 at 7:52