diff options
Diffstat (limited to 'xc/lib/GL/glx/glxcmds.c')
-rw-r--r-- | xc/lib/GL/glx/glxcmds.c | 150 |
1 files changed, 19 insertions, 131 deletions
diff --git a/xc/lib/GL/glx/glxcmds.c b/xc/lib/GL/glx/glxcmds.c index 05af76fd7..df9ddf99f 100644 --- a/xc/lib/GL/glx/glxcmds.c +++ b/xc/lib/GL/glx/glxcmds.c @@ -58,117 +58,6 @@ #define GLX_PREFIX(x) x #endif /* IN_DOXYGEN */ -const char __glXGLClientExtensions[] = - "GL_ARB_depth_texture " - "GL_ARB_imaging " - "GL_ARB_multisample " - "GL_ARB_multitexture " - "GL_ARB_point_parameters " - "GL_ARB_point_sprite " - "GL_ARB_shadow " - "GL_ARB_shadow_ambient " - "GL_ARB_texture_border_clamp " - "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_texture_non_power_of_two " - "GL_ARB_transpose_matrix " - "GL_ARB_window_pos " - "GL_EXT_abgr " - "GL_EXT_bgra " - "GL_EXT_blend_color " - "GL_EXT_blend_func_separate " - "GL_EXT_blend_logic_op " - "GL_EXT_blend_minmax " - "GL_EXT_blend_subtract " - "GL_EXT_clip_volume_hint " - "GL_EXT_copy_texture " - "GL_EXT_draw_range_elements " - "GL_EXT_fog_coord " - "GL_EXT_multi_draw_arrays " - "GL_EXT_packed_pixels " - "GL_EXT_paletted_texture " - "GL_EXT_polygon_offset " - "GL_EXT_rescale_normal " - "GL_EXT_secondary_color " - "GL_EXT_separate_specular_color " - "GL_EXT_shadow_funcs " - "GL_EXT_shared_texture_palette " - "GL_EXT_stencil_two_side " - "GL_EXT_stencil_wrap " - "GL_EXT_subtexture " - "GL_EXT_texture " - "GL_EXT_texture3D " - "GL_EXT_texture_edge_clamp " - "GL_EXT_texture_env_add " - "GL_EXT_texture_env_combine " - "GL_EXT_texture_env_dot3 " - "GL_EXT_texture_filter_anisotropic " - "GL_EXT_texture_lod " - "GL_EXT_texture_lod_bias " - "GL_EXT_texture_mirror_clamp " - "GL_EXT_texture_object " - "GL_EXT_texture_rectangle " - "GL_EXT_vertex_array " - "GL_APPLE_packed_pixels " - "GL_APPLE_ycbcr_422 " - "GL_ATI_texture_env_combine3 " - "GL_ATI_texture_float " - "GL_ATI_texture_mirror_once " - "GL_ATIX_texture_env_combine3 " - "GL_HP_convolution_border_modes " -#if 0 - /* This is currently removed because there seem to be some problems with - * it and the software-only indirect rendering path. At this point, I'm - * not sure which side (client or server) has the problem. - idr - */ - "GL_HP_occlusion_test " -#endif - "GL_IBM_cull_vertex " - "GL_IBM_pixel_filter_hint " - "GL_IBM_rasterpos_clip " - "GL_IBM_texture_clamp_nodraw " - "GL_IBM_texture_mirrored_repeat " - "GL_INGR_blend_func_separate " - "GL_INGR_interlace_read " - "GL_MESA_pack_invert " - "GL_MESA_ycbcr_texture " - "GL_NV_blend_square " - "GL_NV_copy_depth_to_color " - "GL_NV_depth_clamp " - "GL_NV_fog_distance " - "GL_NV_light_max_exponent " - "GL_NV_multisample_filter_hint " - "GL_NV_point_sprite " - "GL_NV_texgen_reflection " - "GL_NV_texture_env_combine4 " - "GL_NV_texture_rectangle " - "GL_SGIS_generate_mipmap " - "GL_SGIS_multisample " - "GL_SGIS_texture_border_clamp " - "GL_SGIS_texture_edge_clamp " - "GL_SGIS_texture_lod " - "GL_SGIX_blend_alpha_minmax " - "GL_SGIX_clipmap " - "GL_SGIX_depth_texture " - "GL_SGIX_fog_offset " - "GL_SGIX_shadow " - "GL_SGIX_shadow_ambient " - "GL_SGIX_texture_coordinate_clamp " - "GL_SGIX_texture_lod_bias " - "GL_SGIX_texture_range " - "GL_SGIX_texture_scale_bias " - "GL_SGIX_vertex_preclip " - "GL_SGIX_vertex_preclip_hint " - "GL_SGIX_ycrcb " - "GL_SUN_convolution_border_modes " - "GL_SUN_multi_draw_arrays " - "GL_SUN_slice_accum " - ; - static const char __glXGLXClientVendorName[] = "SGI"; static const char __glXGLXClientVersion[] = "1.4"; @@ -1511,6 +1400,7 @@ const char *GLX_PREFIX(glXQueryServerString)( Display *dpy, int screen, int name { __GLXscreenConfigs *psc; __GLXdisplayPrivate *priv; + const char ** str; if ( GetGLXPrivScreenConfig( dpy, screen, & priv, & psc ) != Success ) { @@ -1519,35 +1409,31 @@ const char *GLX_PREFIX(glXQueryServerString)( Display *dpy, int screen, int name switch(name) { case GLX_VENDOR: - if (!priv->serverGLXvendor) { - priv->serverGLXvendor = - __glXGetStringFromServer(dpy, priv->majorOpcode, X_GLXQueryServerString, - screen, GLX_VENDOR); - } - return(priv->serverGLXvendor); + str = & priv->serverGLXvendor; + break; case GLX_VERSION: - if (!priv->serverGLXversion) { - priv->serverGLXversion = - __glXGetStringFromServer(dpy, priv->majorOpcode, X_GLXQueryServerString, - screen, GLX_VERSION); - } - return(priv->serverGLXversion); + str = & priv->serverGLXversion; + break; case GLX_EXTENSIONS: - if (!psc->serverGLXexts) { - psc->serverGLXexts = - __glXGetStringFromServer(dpy, priv->majorOpcode, X_GLXQueryServerString, - screen, GLX_EXTENSIONS); - } - return(psc->serverGLXexts); + str = & psc->serverGLXexts; + break; default: return NULL; } + + if ( *str == NULL ) { + *str = __glXGetStringFromServer(dpy, priv->majorOpcode, + X_GLXQueryServerString, screen, name); + } + + return *str; } void __glXClientInfo ( Display *dpy, int opcode ) { xGLXClientInfoReq *req; int size; + char * ext_str = __glXGetClientGLExtensionString(); /* Send the glXClientInfo request */ LockDisplay(dpy); @@ -1557,13 +1443,15 @@ void __glXClientInfo ( Display *dpy, int opcode ) req->major = GLX_MAJOR_VERSION; req->minor = GLX_MINOR_VERSION; - size = strlen(__glXGLClientExtensions) + 1; + size = strlen( ext_str ) + 1; req->length += (size + 3) >> 2; req->numbytes = size; - Data(dpy, __glXGLClientExtensions, size); + Data(dpy, ext_str, size); UnlockDisplay(dpy); SyncHandle(); + + Xfree( ext_str ); } |