running wgl mode in windows crashes!

reason is “Could not share texture contexts between wglGraphics StateGuardians.” but what is causing this and why? This is on my windows set up with 1.4.2 release.

While in dx9 i get shaders to complex! Now i have no way to run my game in windows… please help

C:\Documents and Settings\Administrator\Desktop\2aw\aff2aw>python c_normal.py  1
>>errors.txt
Known pipe types:
  wglGraphicsPipe
  wdxGraphicsPipe9
  wdxGraphicsPipe8
(all display modules loaded.)
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pixel_format 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_multisample 1
:display:gsg:glgsg(debug): GL_VENDOR = ATI Technologies Inc.
:display:gsg:glgsg(debug): GL_RENDERER = MOBILITY RADEON X600 SE x86/SSE2
:display:gsg:glgsg(debug): GL_VERSION = 2.0.5077 WinXP Release, decoded to 2.0.5
077
:display:gsg:glgsg(debug): GL Extensions:
:display:gsg:glgsg(debug): GL_ARB_depth_texture
:display:gsg:glgsg(debug): GL_ARB_fragment_program
:display:gsg:glgsg(debug): GL_ARB_fragment_program_shadow
:display:gsg:glgsg(debug): GL_ARB_fragment_shader
:display:gsg:glgsg(debug): GL_ARB_multisample
:display:gsg:glgsg(debug): GL_ARB_multitexture
:display:gsg:glgsg(debug): GL_ARB_occlusion_query
:display:gsg:glgsg(debug): GL_ARB_point_parameters
:display:gsg:glgsg(debug): GL_ARB_point_sprite
:display:gsg:glgsg(debug): GL_ARB_shader_objects
:display:gsg:glgsg(debug): GL_ARB_shading_language_100
:display:gsg:glgsg(debug): GL_ARB_shadow
:display:gsg:glgsg(debug): GL_ARB_shadow_ambient
:display:gsg:glgsg(debug): GL_ARB_texture_border_clamp
:display:gsg:glgsg(debug): GL_ARB_texture_compression
:display:gsg:glgsg(debug): GL_ARB_texture_cube_map
:display:gsg:glgsg(debug): GL_ARB_texture_env_add
:display:gsg:glgsg(debug): GL_ARB_texture_env_combine
:display:gsg:glgsg(debug): GL_ARB_texture_env_crossbar
:display:gsg:glgsg(debug): GL_ARB_texture_env_dot3
:display:gsg:glgsg(debug): GL_ARB_texture_mirrored_repeat
:display:gsg:glgsg(debug): GL_ARB_transpose_matrix
:display:gsg:glgsg(debug): GL_ARB_vertex_blend
:display:gsg:glgsg(debug): GL_ARB_vertex_buffer_object
:display:gsg:glgsg(debug): GL_ARB_vertex_program
:display:gsg:glgsg(debug): GL_ARB_vertex_shader
:display:gsg:glgsg(debug): GL_ARB_window_pos
:display:gsg:glgsg(debug): GL_ATIX_texture_env_combine3
:display:gsg:glgsg(debug): GL_ATIX_texture_env_route
:display:gsg:glgsg(debug): GL_ATIX_vertex_shader_output_point_size
:display:gsg:glgsg(debug): GL_ATI_draw_buffers
:display:gsg:glgsg(debug): GL_ATI_element_array
:display:gsg:glgsg(debug): GL_ATI_envmap_bumpmap
:display:gsg:glgsg(debug): GL_ATI_fragment_shader
:display:gsg:glgsg(debug): GL_ATI_map_object_buffer
:display:gsg:glgsg(debug): GL_ATI_separate_stencil
:display:gsg:glgsg(debug): GL_ATI_texture_env_combine3
:display:gsg:glgsg(debug): GL_ATI_texture_float
:display:gsg:glgsg(debug): GL_ATI_texture_mirror_once
:display:gsg:glgsg(debug): GL_ATI_vertex_array_object
:display:gsg:glgsg(debug): GL_ATI_vertex_attrib_array_object
:display:gsg:glgsg(debug): GL_ATI_vertex_streams
:display:gsg:glgsg(debug): GL_EXT_abgr
:display:gsg:glgsg(debug): GL_EXT_bgra
:display:gsg:glgsg(debug): GL_EXT_blend_color
:display:gsg:glgsg(debug): GL_EXT_blend_func_separate
:display:gsg:glgsg(debug): GL_EXT_blend_minmax
:display:gsg:glgsg(debug): GL_EXT_blend_subtract
:display:gsg:glgsg(debug): GL_EXT_clip_volume_hint
:display:gsg:glgsg(debug): GL_EXT_compiled_vertex_array
:display:gsg:glgsg(debug): GL_EXT_draw_range_elements
:display:gsg:glgsg(debug): GL_EXT_fog_coord
:display:gsg:glgsg(debug): GL_EXT_multi_draw_arrays
:display:gsg:glgsg(debug): GL_EXT_packed_pixels
:display:gsg:glgsg(debug): GL_EXT_point_parameters
:display:gsg:glgsg(debug): GL_EXT_rescale_normal
:display:gsg:glgsg(debug): GL_EXT_secondary_color
:display:gsg:glgsg(debug): GL_EXT_separate_specular_color
:display:gsg:glgsg(debug): GL_EXT_shadow_funcs
:display:gsg:glgsg(debug): GL_EXT_stencil_wrap
:display:gsg:glgsg(debug): GL_EXT_texgen_reflection
:display:gsg:glgsg(debug): GL_EXT_texture3D
:display:gsg:glgsg(debug): GL_EXT_texture_compression_s3tc
:display:gsg:glgsg(debug): GL_EXT_texture_cube_map
:display:gsg:glgsg(debug): GL_EXT_texture_edge_clamp
:display:gsg:glgsg(debug): GL_EXT_texture_env_add
:display:gsg:glgsg(debug): GL_EXT_texture_env_combine
:display:gsg:glgsg(debug): GL_EXT_texture_env_dot3
:display:gsg:glgsg(debug): GL_EXT_texture_filter_anisotropic
:display:gsg:glgsg(debug): GL_EXT_texture_lod_bias
:display:gsg:glgsg(debug): GL_EXT_texture_mirror_clamp
:display:gsg:glgsg(debug): GL_EXT_texture_object
:display:gsg:glgsg(debug): GL_EXT_texture_rectangle
:display:gsg:glgsg(debug): GL_EXT_vertex_array
:display:gsg:glgsg(debug): GL_EXT_vertex_shader
:display:gsg:glgsg(debug): GL_HP_occlusion_test
:display:gsg:glgsg(debug): GL_NV_blend_square
:display:gsg:glgsg(debug): GL_NV_occlusion_query
:display:gsg:glgsg(debug): GL_NV_texgen_reflection
:display:gsg:glgsg(debug): GL_S3_s3tc
:display:gsg:glgsg(debug): GL_SGIS_generate_mipmap
:display:gsg:glgsg(debug): GL_SGIS_multitexture
:display:gsg:glgsg(debug): GL_SGIS_texture_border_clamp
:display:gsg:glgsg(debug): GL_SGIS_texture_edge_clamp
:display:gsg:glgsg(debug): GL_SGIS_texture_lod
:display:gsg:glgsg(debug): GL_SGI_color_matrix
:display:gsg:glgsg(debug): GL_SUN_multi_draw_arrays
:display:gsg:glgsg(debug): GL_WIN_swap_hint
:display:gsg:glgsg(debug): WGL_ARB_extensions_string
:display:gsg:glgsg(debug): WGL_ARB_make_current_read
:display:gsg:glgsg(debug): WGL_ARB_multisample
:display:gsg:glgsg(debug): WGL_ARB_pbuffer
:display:gsg:glgsg(debug): WGL_ARB_pixel_format
:display:gsg:glgsg(debug): WGL_ARB_render_texture
:display:gsg:glgsg(debug): WGL_ATI_pixel_format_float
:display:gsg:glgsg(debug): WGL_ATI_render_texture_rectangle
:display:gsg:glgsg(debug): WGL_EXT_extensions_string
:display:gsg:glgsg(debug): WGL_EXT_swap_control
:display:gsg:glgsg(debug): HAS EXT GL_ARB_point_sprite 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_vertex_blend 1
:display:gsg:glgsg(debug): max vertex transforms = 4
:display:gsg:glgsg(debug): HAS EXT GL_ARB_matrix_palette 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_depth_texture 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_packed_depth_stencil 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_cube_map 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_bgra 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_rescale_normal 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_multisample 1
:display:gsg:glgsg(debug): HAS EXT GL_SGIS_generate_mipmap 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_non_power_of_two 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_depth_texture 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_shadow 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_fragment_program_shadow 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_env_combine 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_env_crossbar 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_env_dot3 1
:display:gsg:glgsg(debug): HAS EXT GL_ATI_draw_buffers 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_framebuffer_object 0
:display:gsg:glgsg(debug): Occlusion query counter provides 32 bits.
:display:gsg:glgsg(debug): HAS EXT GL_SGIS_texture_edge_clamp 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_border_clamp 1
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_mirrored_repeat 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_texture_mirror_clamp 1
:display:gsg:glgsg(debug): max texture dimension = 2048, max 3d texture = 2048,
max cube map = 2048
:display:gsg:glgsg(debug): max_elements_vertices = 2147483647, max_elements_indi
ces = 65535
:display:gsg:glgsg(debug): vertex buffer objects are supported.
:display:gsg:glgsg(debug): Supported compressed texture formats:
  GL_COMPRESSED_RGB_S3TC_DXT1_EXT
  GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
  GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
  GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
:display:gsg:glgsg(debug): HAS EXT GL_EXT_stencil_wrap 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_stencil_two_side 0
:display:gsg:glgsg(debug): max lights = 8
:display:gsg:glgsg(debug): max clip planes = 6
:display:gsg:glgsg(debug): max texture stages = 8
:display:gsg:glgsg(debug):
Cg vertex profile = arbvp1  id = 6150
Cg pixel profile = arbfp1  id = 7000
shader model = 2
:display:gsg:glgsg(debug): HAS EXT WGL_EXT_swap_control 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pbuffer 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pixel_format 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_multisample 1
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_render_texture 1
:util(warning): Adjusting global clock's real time by 0.538953 seconds.
:display:gsg:glgsg(debug): Glow scene is not valid
:display:gsg:glgsg(debug): Glow scene is not valid
:display(error): Window wouldn't open; abandoning window.
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pixel_format 0
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_multisample 0
:display:wgldisplay(error): Could not share texture contexts between wglGraphics
StateGuardians.
:display:gsg:glgsg(debug): GL_VENDOR = Microsoft Corporation
:display:gsg:glgsg(debug): GL_RENDERER = GDI Generic
:display:gsg:glgsg(debug): GL_VERSION = 1.1.0, decoded to 1.1.0
:display:gsg:glgsg(debug): GL Extensions:
:display:gsg:glgsg(debug): GL_EXT_bgra
:display:gsg:glgsg(debug): GL_EXT_paletted_texture
:display:gsg:glgsg(debug): GL_WIN_swap_hint
:display:gsg:glgsg(debug): HAS EXT GL_ARB_point_parameters 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_point_sprite 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_vertex_blend 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_matrix_palette 0
:display:gsg:glgsg(debug): HAS EXT GL_EXT_draw_range_elements 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_depth_texture 0
:display:gsg:glgsg(debug): HAS EXT GL_EXT_texture3D 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_cube_map 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_compression 0
:display:gsg:glgsg(debug): HAS EXT GL_EXT_bgra 1
:display:gsg:glgsg(debug): HAS EXT GL_EXT_rescale_normal 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_multisample 0
:display:gsg:glgsg(debug): HAS EXT GL_SGIS_generate_mipmap 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_non_power_of_two 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_multitexture 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_depth_texture 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_env_combine 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_env_crossbar 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_env_dot3 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_vertex_buffer_object 0
:display:gsg:glgsg(debug): HAS EXT GL_ATI_draw_buffers 0
:display:gsg:glgsg(debug): HAS EXT GL_EXT_framebuffer_object 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_draw_buffers 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_occlusion_query 0
:display:gsg:glgsg(debug): HAS EXT GL_EXT_blend_minmax 0
:display:gsg:glgsg(debug): HAS EXT GL_EXT_blend_color 0
:display:gsg:glgsg(debug): HAS EXT GL_SGIS_texture_edge_clamp 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_border_clamp 0
:display:gsg:glgsg(debug): HAS EXT GL_ARB_texture_mirrored_repeat 0
:display:gsg:glgsg(debug): HAS EXT GL_EXT_texture_mirror_clamp 0
:display:gsg:glgsg(debug): max texture dimension = 1024, max 3d texture = 0, max
 cube map = 0
:display:gsg:glgsg(debug): max_elements_vertices = 256, max_elements_indices = 2
048
:display:gsg:glgsg(debug): vertex buffer objects are NOT supported.
:display:gsg:glgsg(debug): Texture compression is not supported.
:display:gsg:glgsg(debug): HAS EXT GL_EXT_stencil_wrap 0
:display:gsg:glgsg(debug): HAS EXT GL_EXT_stencil_two_side 0
:display:gsg:glgsg(debug): max lights = 8
:display:gsg:glgsg(debug): max clip planes = 6
:display:gsg:glgsg(debug):
Cg vertex profile = arbvp1  id = 6150
Cg pixel profile = arbfp1  id = 7000
shader model = 2
:display:gsg:glgsg(debug): HAS EXT WGL_EXT_swap_control 0
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pbuffer 0
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_pixel_format 0
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_multisample 0
:display:gsg:glgsg(debug): HAS EXT WGL_ARB_render_texture 0

C:\Documents and Settings\Administrator\Desktop\2aw\aff2aw>pause
Press any key to continue . . .

EDIT:
I used my fall back shaders and got it running very ugly in dx9 but it appears to be combo of shader and overtiled texture which produces very ugly results. I get lots of this error:

:display:gsg:dxgsg9(error): could not find matching vertex element data for vert
ex shader

I have no idea. David?

The message “Could not share texture contexts between wglGraphicsStateGuardians.” is printed when the call to wglShareLists() fails. This call is supposed to set up your two different OpenGL contexts so that they share the same texture objects (and similar graphics objects).

It might fail if the two graphics contexts are using two different graphics cards, or if one of them is software and one of them is hardware. Technically it might fail any time your two different graphics contexts have different framebuffer properties.

What’s causing it to fail in your case is hard to guess without knowing more about your application and the way in which you are creating graphics contexts. But one workaround would be to use the same GSG for all of your windows and offscreen buffers (just pass base.win.getGsg() in to the function that creates the buffer).

David

well i only have one graphics card why would it have 2 contexts?

I have used window.makeTextureBuffer to create most buffers and it worked pretty well - what method do you think is best?

I don’t know why it might be creating a new context; but the first question to ask is, is it? Check that buffer.getGsg() == win.getGsg(). Also check the buffer class: buffer.getType(). Is it a wglGraphicsBuffer, a GLGraphicsBuffer, or a ParasiteBuffer? Each of these has a very different semantics for construction.

David

yep disabling my parasite buffers (that only thing my card can create) fixes the problem.