[cairo-commit] glitz/src glitz_agl_extension.c, 1.8, 1.9 glitz_agl_info.c, 1.10, 1.11 glitz_aglint.h, 1.11, 1.12 glitz_glx_context.c, 1.12, 1.13 glitz_glx_extension.c, 1.11, 1.12 glitz_glx_info.c, 1.16, 1.17 glitz_glxint.h, 1.15, 1.16 glitz_util.c, 1.9, 1.10 glitzint.h, 1.24, 1.25

David Reveman commit at pdx.freedesktop.org
Tue Sep 7 07:28:23 PDT 2004


Committed by: davidr

Update of /cvs/cairo/glitz/src
In directory gabe:/tmp/cvs-serv3161/src

Modified Files:
	glitz_agl_extension.c glitz_agl_info.c glitz_aglint.h 
	glitz_glx_context.c glitz_glx_extension.c glitz_glx_info.c 
	glitz_glxint.h glitz_util.c glitzint.h 
Log Message:
Improved extension checking

Index: glitz_agl_extension.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_agl_extension.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** glitz_agl_extension.c	6 Sep 2004 22:23:29 -0000	1.8
--- glitz_agl_extension.c	7 Sep 2004 14:28:21 -0000	1.9
***************
*** 35,66 ****
  
  static glitz_extension_map gl_extensions[] = {
!   { "GL_APPLE_pixel_buffer", GLITZ_AGL_FEATURE_PBUFFER_MASK },
!   { "GL_EXT_texture_rectangle", GLITZ_AGL_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { "GL_NV_texture_rectangle", GLITZ_AGL_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { "GL_ARB_texture_non_power_of_two",
      GLITZ_AGL_FEATURE_TEXTURE_NON_POWER_OF_TWO_MASK },
!   { "GL_ARB_texture_mirrored_repeat",
      GLITZ_AGL_FEATURE_TEXTURE_MIRRORED_REPEAT_MASK },
!   { "GL_ARB_texture_border_clamp",
      GLITZ_AGL_FEATURE_TEXTURE_BORDER_CLAMP_MASK },
!   { "GL_ARB_texture_env_combine", GLITZ_AGL_FEATURE_TEXTURE_ENV_COMBINE_MASK },
!   { "GL_EXT_texture_env_combine", GLITZ_AGL_FEATURE_TEXTURE_ENV_COMBINE_MASK },
!   { "GL_ARB_texture_env_dot3", GLITZ_AGL_FEATURE_TEXTURE_ENV_DOT3_MASK },
!   { "GL_ARB_multisample", GLITZ_AGL_FEATURE_MULTISAMPLE_MASK },
!   { "GL_NV_multisample_filter_hint",
      GLITZ_AGL_FEATURE_MULTISAMPLE_FILTER_HINT_MASK },
!   { "GL_ARB_multitexture", GLITZ_AGL_FEATURE_MULTITEXTURE_MASK },
!   { "GL_ARB_fragment_program", GLITZ_AGL_FEATURE_FRAGMENT_PROGRAM_MASK },
!   /* TODO: lookup all symbols not part of OpenGL 1.1
!      { "GL_ARB_vertex_buffer_object",
!      GLITZ_AGL_FEATURE_VERTEX_BUFFER_OBJECT_MASK },
!      { "GL_EXT_pixel_buffer_object",
!      GLITZ_AGL_FEATURE_PIXEL_BUFFER_OBJECT_MASK },
    */
!   { NULL, 0 }
  };
  
! static long int
! _glitz_agl_extension_query_gl (void)
  {
    const char *gl_extensions_strings;
--- 35,73 ----
  
  static glitz_extension_map gl_extensions[] = {
!   { 0.0, "GL_APPLE_pixel_buffer", GLITZ_AGL_FEATURE_PBUFFER_MASK },
!   { 0.0, "GL_ARB_texture_rectangle",
!     GLITZ_AGL_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { 0.0, "GL_EXT_texture_rectangle",
!     GLITZ_AGL_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { 0.0, "GL_NV_texture_rectangle", GLITZ_AGL_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { 0.0, "GL_ARB_texture_non_power_of_two",
      GLITZ_AGL_FEATURE_TEXTURE_NON_POWER_OF_TWO_MASK },
!   { 1.4, "GL_ARB_texture_mirrored_repeat",
      GLITZ_AGL_FEATURE_TEXTURE_MIRRORED_REPEAT_MASK },
!   { 1.3, "GL_ARB_texture_border_clamp",
      GLITZ_AGL_FEATURE_TEXTURE_BORDER_CLAMP_MASK },
!   { 1.3, "GL_ARB_texture_env_combine",
!     GLITZ_AGL_FEATURE_TEXTURE_ENV_COMBINE_MASK },
!   { 1.3, "GL_EXT_texture_env_combine",
!     GLITZ_AGL_FEATURE_TEXTURE_ENV_COMBINE_MASK },
!   { 1.3, "GL_ARB_texture_env_dot3", GLITZ_AGL_FEATURE_TEXTURE_ENV_DOT3_MASK },
!   { 1.3, "GL_ARB_multisample", GLITZ_AGL_FEATURE_MULTISAMPLE_MASK },
!   { 0.0, "GL_NV_multisample_filter_hint",
      GLITZ_AGL_FEATURE_MULTISAMPLE_FILTER_HINT_MASK },
!   { 1.3, "GL_ARB_multitexture", GLITZ_AGL_FEATURE_MULTITEXTURE_MASK },
!   { 0.0, "GL_ARB_fragment_program", GLITZ_AGL_FEATURE_FRAGMENT_PROGRAM_MASK },
!   
!   /* TODO: lookup all symbols not part of OpenGL 1.2
!      { 1.5, "GL_ARB_vertex_buffer_object",
!      GLITZ_GLX_FEATURE_VERTEX_BUFFER_OBJECT_MASK },
!      { 0.0, "GL_EXT_pixel_buffer_object",
!      GLITZ_GLX_FEATURE_PIXEL_BUFFER_OBJECT_MASK },
    */
!   
!   { 0.0, NULL, 0 }
  };
  
! static unsigned long
! _glitz_agl_extension_query_gl (glitz_gl_float_t gl_version)
  {
    const char *gl_extensions_strings;
***************
*** 68,77 ****
    gl_extensions_strings = (const char *) glGetString (GL_EXTENSIONS);
  
!   return glitz_extensions_query (gl_extensions_strings, gl_extensions);
  }
  
! void
  glitz_agl_query_extensions (glitz_agl_thread_info_t *thread_info)
  {
    thread_info->agl_feature_mask = 0;
    
--- 75,92 ----
    gl_extensions_strings = (const char *) glGetString (GL_EXTENSIONS);
  
!   return glitz_extensions_query (gl_version,
!                                  gl_extensions_strings,
!                                  gl_extensions);
  }
  
! glitz_status_t
  glitz_agl_query_extensions (glitz_agl_thread_info_t *thread_info)
  {
+   glitz_gl_float_t gl_version;
+ 
+   gl_version = atof ((const char *) glGetString (GL_VERSION));
+   if (gl_version < 1.2)
+     return GLITZ_STATUS_NOT_SUPPORTED;
+   
    thread_info->agl_feature_mask = 0;
    
***************
*** 143,145 ****
--- 158,162 ----
        GLITZ_AGL_FEATURE_PIXEL_BUFFER_OBJECT_MASK)
      thread_info->feature_mask |= GLITZ_FEATURE_PIXEL_BUFFER_OBJECT_MASK;
+ 
+   return GLITZ_STATUS_SUCCESS;
  }

Index: glitz_agl_info.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_agl_info.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** glitz_agl_info.c	3 Sep 2004 14:27:58 -0000	1.10
--- glitz_agl_info.c	7 Sep 2004 14:28:21 -0000	1.11
***************
*** 99,103 ****
    (glitz_gl_get_program_iv_t) glGetProgramivARB,
  
!   /* TODO: lookup all symbols not part of OpenGL 1.1 */
    (glitz_gl_gen_buffers_t) 0,
    (glitz_gl_delete_buffers_t) 0,
--- 99,103 ----
    (glitz_gl_get_program_iv_t) glGetProgramivARB,
  
!   /* TODO: lookup all symbols not part of OpenGL 1.2 */
    (glitz_gl_gen_buffers_t) 0,
    (glitz_gl_delete_buffers_t) 0,
***************
*** 234,239 ****
        aglSetCurrentContext (thread_info->root_context.context);
    
!       glitz_agl_query_extensions (thread_info);  
!       glitz_agl_query_formats (thread_info);
      }
    }
--- 234,239 ----
        aglSetCurrentContext (thread_info->root_context.context);
    
!       if (glitz_agl_query_extensions (thread_info) == GLITZ_STATUS_SUCCESS)
!         glitz_agl_query_formats (thread_info);
      }
    }

Index: glitz_aglint.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_aglint.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** glitz_aglint.h	6 Sep 2004 22:23:29 -0000	1.11
--- glitz_aglint.h	7 Sep 2004 14:28:21 -0000	1.12
***************
*** 95,99 ****
  };
  
! extern void __internal_linkage
  glitz_agl_query_extensions (glitz_agl_thread_info_t *thread_info);
  
--- 95,99 ----
  };
  
! extern glitz_status_t __internal_linkage
  glitz_agl_query_extensions (glitz_agl_thread_info_t *thread_info);
  

Index: glitz_glx_context.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_glx_context.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** glitz_glx_context.c	3 Sep 2004 14:27:58 -0000	1.12
--- glitz_glx_context.c	7 Sep 2004 14:28:21 -0000	1.13
***************
*** 211,219 ****
    glitz_glx_thread_info_t *thread_info =
      screen_info->display_info->thread_info;
-     
-   context->backend.gl.active_texture =
-     (glitz_gl_active_texture_t)
-     glitz_glx_get_proc_address (thread_info, "glActiveTextureARB");
  
    context->backend.gl.gen_programs =
      (glitz_gl_gen_programs_t)
--- 211,225 ----
    glitz_glx_thread_info_t *thread_info =
      screen_info->display_info->thread_info;
  
+   if (screen_info->gl_version >= 1.3) {
+     context->backend.gl.active_texture =
+       (glitz_gl_active_texture_t)
+       glitz_glx_get_proc_address (thread_info, "glActiveTexture");
+   } else {
+     context->backend.gl.active_texture =
+       (glitz_gl_active_texture_t)
+       glitz_glx_get_proc_address (thread_info, "glActiveTextureARB");
+   }
+   
    context->backend.gl.gen_programs =
      (glitz_gl_gen_programs_t)
***************
*** 235,262 ****
      glitz_glx_get_proc_address (thread_info, "glGetProgramivARB");
  
!   context->backend.gl.gen_buffers =
!     (glitz_gl_gen_buffers_t)
!     glitz_glx_get_proc_address (thread_info, "glGenBuffersARB");
!   context->backend.gl.delete_buffers =
!     (glitz_gl_delete_buffers_t)
!     glitz_glx_get_proc_address (thread_info, "glDeleteBuffersARB");
!   context->backend.gl.bind_buffer =
!     (glitz_gl_bind_buffer_t)
!     glitz_glx_get_proc_address (thread_info, "glBindBufferARB");
!   context->backend.gl.buffer_data =
!     (glitz_gl_buffer_data_t)
!     glitz_glx_get_proc_address (thread_info, "glBufferDataARB");
!   context->backend.gl.buffer_sub_data =
!     (glitz_gl_buffer_sub_data_t)
!     glitz_glx_get_proc_address (thread_info, "glBufferSubDataARB");
!   context->backend.gl.get_buffer_sub_data =
!     (glitz_gl_get_buffer_sub_data_t)
!     glitz_glx_get_proc_address (thread_info, "glGetBufferSubDataARB");
!   context->backend.gl.map_buffer =
!     (glitz_gl_map_buffer_t)
!     glitz_glx_get_proc_address (thread_info, "glMapBufferARB");
!   context->backend.gl.unmap_buffer =
!     (glitz_gl_unmap_buffer_t)
!     glitz_glx_get_proc_address (thread_info, "glUnmapBufferARB");
  
    context->backend.feature_mask = screen_info->feature_mask;
--- 241,295 ----
      glitz_glx_get_proc_address (thread_info, "glGetProgramivARB");
  
!   if (screen_info->gl_version >= 1.5) {
!     context->backend.gl.gen_buffers =
!       (glitz_gl_gen_buffers_t)
!       glitz_glx_get_proc_address (thread_info, "glGenBuffers");
!     context->backend.gl.delete_buffers =
!       (glitz_gl_delete_buffers_t)
!       glitz_glx_get_proc_address (thread_info, "glDeleteBuffers");
!     context->backend.gl.bind_buffer =
!       (glitz_gl_bind_buffer_t)
!       glitz_glx_get_proc_address (thread_info, "glBindBuffer");
!     context->backend.gl.buffer_data =
!       (glitz_gl_buffer_data_t)
!       glitz_glx_get_proc_address (thread_info, "glBufferData");
!     context->backend.gl.buffer_sub_data =
!       (glitz_gl_buffer_sub_data_t)
!       glitz_glx_get_proc_address (thread_info, "glBufferSubData");
!     context->backend.gl.get_buffer_sub_data =
!       (glitz_gl_get_buffer_sub_data_t)
!       glitz_glx_get_proc_address (thread_info, "glGetBufferSubData");
!     context->backend.gl.map_buffer =
!       (glitz_gl_map_buffer_t)
!       glitz_glx_get_proc_address (thread_info, "glMapBuffer");
!     context->backend.gl.unmap_buffer =
!       (glitz_gl_unmap_buffer_t)
!       glitz_glx_get_proc_address (thread_info, "glUnmapBuffer");
!   } else {
!     context->backend.gl.gen_buffers =
!       (glitz_gl_gen_buffers_t)
!       glitz_glx_get_proc_address (thread_info, "glGenBuffersARB");
!     context->backend.gl.delete_buffers =
!       (glitz_gl_delete_buffers_t)
!       glitz_glx_get_proc_address (thread_info, "glDeleteBuffersARB");
!     context->backend.gl.bind_buffer =
!       (glitz_gl_bind_buffer_t)
!       glitz_glx_get_proc_address (thread_info, "glBindBufferARB");
!     context->backend.gl.buffer_data =
!       (glitz_gl_buffer_data_t)
!       glitz_glx_get_proc_address (thread_info, "glBufferDataARB");
!     context->backend.gl.buffer_sub_data =
!       (glitz_gl_buffer_sub_data_t)
!       glitz_glx_get_proc_address (thread_info, "glBufferSubDataARB");
!     context->backend.gl.get_buffer_sub_data =
!       (glitz_gl_get_buffer_sub_data_t)
!       glitz_glx_get_proc_address (thread_info, "glGetBufferSubDataARB");
!     context->backend.gl.map_buffer =
!       (glitz_gl_map_buffer_t)
!       glitz_glx_get_proc_address (thread_info, "glMapBufferARB");
!     context->backend.gl.unmap_buffer =
!       (glitz_gl_unmap_buffer_t)
!       glitz_glx_get_proc_address (thread_info, "glUnmapBufferARB");
!   }
  
    context->backend.feature_mask = screen_info->feature_mask;

Index: glitz_glx_extension.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_glx_extension.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** glitz_glx_extension.c	6 Sep 2004 22:23:29 -0000	1.11
--- glitz_glx_extension.c	7 Sep 2004 14:28:21 -0000	1.12
***************
*** 33,62 ****
  
  static glitz_extension_map client_glx_extensions[] = {
!   { "GLX_ARB_multisample", GLITZ_GLX_FEATURE_CLIENT_MULTISAMPLE_MASK },
!   { NULL, 0 }
  }, gl_extensions[] = {
!   { "GL_EXT_texture_rectangle", GLITZ_GLX_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { "GL_NV_texture_rectangle", GLITZ_GLX_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { "GL_ARB_texture_non_power_of_two",
      GLITZ_GLX_FEATURE_TEXTURE_NON_POWER_OF_TWO_MASK },
!   { "GL_ARB_texture_mirrored_repeat",
      GLITZ_GLX_FEATURE_TEXTURE_MIRRORED_REPEAT_MASK },
!   { "GL_ARB_texture_border_clamp",
      GLITZ_GLX_FEATURE_TEXTURE_BORDER_CLAMP_MASK },
!   { "GL_ARB_texture_env_combine", GLITZ_GLX_FEATURE_TEXTURE_ENV_COMBINE_MASK },
!   { "GL_EXT_texture_env_combine", GLITZ_GLX_FEATURE_TEXTURE_ENV_COMBINE_MASK },
!   { "GL_ARB_texture_env_dot3", GLITZ_GLX_FEATURE_TEXTURE_ENV_DOT3_MASK },
!   { "GL_ARB_multisample", GLITZ_GLX_FEATURE_MULTISAMPLE_MASK },
!   { "GL_NV_multisample_filter_hint",
      GLITZ_GLX_FEATURE_MULTISAMPLE_FILTER_HINT_MASK },
!   { "GL_ARB_multitexture", GLITZ_GLX_FEATURE_MULTITEXTURE_MASK },
!   { "GL_ARB_fragment_program", GLITZ_GLX_FEATURE_FRAGMENT_PROGRAM_MASK },
!   { "GL_ARB_vertex_buffer_object",
      GLITZ_GLX_FEATURE_VERTEX_BUFFER_OBJECT_MASK },
!   { "GL_EXT_pixel_buffer_object", GLITZ_GLX_FEATURE_PIXEL_BUFFER_OBJECT_MASK },
!   { NULL, 0 }
  };
  
! static long int
  _glitz_glx_extension_query_client_glx (Display *display)
  {
--- 33,68 ----
  
  static glitz_extension_map client_glx_extensions[] = {
!   { 0.0, "GLX_ARB_multisample", GLITZ_GLX_FEATURE_CLIENT_MULTISAMPLE_MASK },
!   { 0.0, NULL, 0 }
  }, gl_extensions[] = {
!   { 0.0, "GL_ARB_texture_rectangle",
!     GLITZ_GLX_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { 0.0, "GL_EXT_texture_rectangle",
!     GLITZ_GLX_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { 0.0, "GL_NV_texture_rectangle", GLITZ_GLX_FEATURE_TEXTURE_RECTANGLE_MASK },
!   { 0.0, "GL_ARB_texture_non_power_of_two",
      GLITZ_GLX_FEATURE_TEXTURE_NON_POWER_OF_TWO_MASK },
!   { 1.4, "GL_ARB_texture_mirrored_repeat",
      GLITZ_GLX_FEATURE_TEXTURE_MIRRORED_REPEAT_MASK },
!   { 1.3, "GL_ARB_texture_border_clamp",
      GLITZ_GLX_FEATURE_TEXTURE_BORDER_CLAMP_MASK },
!   { 1.3, "GL_ARB_texture_env_combine",
!     GLITZ_GLX_FEATURE_TEXTURE_ENV_COMBINE_MASK },
!   { 1.3, "GL_EXT_texture_env_combine",
!     GLITZ_GLX_FEATURE_TEXTURE_ENV_COMBINE_MASK },
!   { 1.3, "GL_ARB_texture_env_dot3", GLITZ_GLX_FEATURE_TEXTURE_ENV_DOT3_MASK },
!   { 1.3, "GL_ARB_multisample", GLITZ_GLX_FEATURE_MULTISAMPLE_MASK },
!   { 0.0, "GL_NV_multisample_filter_hint",
      GLITZ_GLX_FEATURE_MULTISAMPLE_FILTER_HINT_MASK },
!   { 1.3, "GL_ARB_multitexture", GLITZ_GLX_FEATURE_MULTITEXTURE_MASK },
!   { 0.0, "GL_ARB_fragment_program", GLITZ_GLX_FEATURE_FRAGMENT_PROGRAM_MASK },
!   { 1.5, "GL_ARB_vertex_buffer_object",
      GLITZ_GLX_FEATURE_VERTEX_BUFFER_OBJECT_MASK },
!   { 0.0, "GL_EXT_pixel_buffer_object",
!     GLITZ_GLX_FEATURE_PIXEL_BUFFER_OBJECT_MASK },
!   { 0.0, NULL, 0 }
  };
  
! static unsigned long
  _glitz_glx_extension_query_client_glx (Display *display)
  {
***************
*** 65,74 ****
    client_glx_extensions_strings = glXGetClientString (display, GLX_EXTENSIONS);
    
!   return glitz_extensions_query (client_glx_extensions_strings,
                                   client_glx_extensions);
  }
  
! static long int
! _glitz_glx_extension_query_gl (void)
  {
    const char *gl_extensions_strings;
--- 71,81 ----
    client_glx_extensions_strings = glXGetClientString (display, GLX_EXTENSIONS);
    
!   return glitz_extensions_query (0.0,
!                                  client_glx_extensions_strings,
                                   client_glx_extensions);
  }
  
! static unsigned long
! _glitz_glx_extension_query_gl (glitz_gl_float_t gl_version)
  {
    const char *gl_extensions_strings;
***************
*** 76,92 ****
    gl_extensions_strings = (const char *) glGetString (GL_EXTENSIONS);
  
!   return glitz_extensions_query (gl_extensions_strings, gl_extensions);
  }
  
! void
  glitz_glx_query_extensions (glitz_glx_screen_info_t *screen_info)
  {
    glitz_glx_static_proc_address_list_t *glx =
      &screen_info->display_info->thread_info->glx;
    
    screen_info->glx_feature_mask |=
      _glitz_glx_extension_query_client_glx (screen_info->display_info->display);
    
!   screen_info->glx_feature_mask |= _glitz_glx_extension_query_gl ();
  
    if (glx->get_fbconfigs &&
--- 83,106 ----
    gl_extensions_strings = (const char *) glGetString (GL_EXTENSIONS);
  
!   return glitz_extensions_query (gl_version,
!                                  gl_extensions_strings,
!                                  gl_extensions);
  }
  
! glitz_status_t
  glitz_glx_query_extensions (glitz_glx_screen_info_t *screen_info)
  {
    glitz_glx_static_proc_address_list_t *glx =
      &screen_info->display_info->thread_info->glx;
+ 
+   screen_info->gl_version = atof ((const char *) glGetString (GL_VERSION));
+   if (screen_info->gl_version < 1.2)
+     return GLITZ_STATUS_NOT_SUPPORTED;
    
    screen_info->glx_feature_mask |=
      _glitz_glx_extension_query_client_glx (screen_info->display_info->display);
    
!   screen_info->glx_feature_mask |=
!     _glitz_glx_extension_query_gl (screen_info->gl_version);
  
    if (glx->get_fbconfigs &&
***************
*** 166,168 ****
--- 180,184 ----
        GLITZ_GLX_FEATURE_PIXEL_BUFFER_OBJECT_MASK)
      screen_info->feature_mask |= GLITZ_FEATURE_PIXEL_BUFFER_OBJECT_MASK;
+ 
+   return GLITZ_STATUS_SUCCESS;
  }

Index: glitz_glx_info.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_glx_info.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** glitz_glx_info.c	6 Sep 2004 22:23:29 -0000	1.16
--- glitz_glx_info.c	7 Sep 2004 14:28:21 -0000	1.17
***************
*** 460,467 ****
                        screen_info->root_drawable,
                        screen_info->root_context.context)) {
!     glitz_glx_query_extensions (screen_info);
!     glitz_glx_context_proc_address_lookup (screen_info,
!                                            &screen_info->root_context);
!     glitz_glx_query_formats (screen_info);
    }
  
--- 460,468 ----
                        screen_info->root_drawable,
                        screen_info->root_context.context)) {
!     if (glitz_glx_query_extensions (screen_info) == GLITZ_STATUS_SUCCESS) {
!       glitz_glx_context_proc_address_lookup (screen_info,
!                                              &screen_info->root_context);
!       glitz_glx_query_formats (screen_info);
!     }
    }
  

Index: glitz_glxint.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_glxint.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** glitz_glxint.h	6 Sep 2004 22:23:29 -0000	1.15
--- glitz_glxint.h	7 Sep 2004 14:28:21 -0000	1.16
***************
*** 115,118 ****
--- 115,119 ----
    unsigned long feature_mask;
    unsigned long glx_feature_mask;
+   glitz_gl_float_t gl_version;
  
    glitz_program_map_t program_map;
***************
*** 128,132 ****
  };
  
! extern void __internal_linkage
  glitz_glx_query_extensions (glitz_glx_screen_info_t *screen_info);
  
--- 129,133 ----
  };
  
! extern glitz_status_t __internal_linkage
  glitz_glx_query_extensions (glitz_glx_screen_info_t *screen_info);
  

Index: glitz_util.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_util.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** glitz_util.c	3 Sep 2004 14:27:58 -0000	1.9
--- glitz_util.c	7 Sep 2004 14:28:21 -0000	1.10
***************
*** 87,99 ****
  }
  
! long int
! glitz_extensions_query (const char *extensions_string,
                          glitz_extension_map *extensions_map)
  {
!   long int mask = 0;
    int i;
  
    for (i = 0; extensions_map[i].name; i++)
!     if (_glitz_extension_check (extensions_string, extensions_map[i].name))
        mask |= extensions_map[i].mask;
  
--- 87,102 ----
  }
  
! unsigned long
! glitz_extensions_query (glitz_gl_float_t version,
!                         const char *extensions_string,
                          glitz_extension_map *extensions_map)
  {
!   unsigned long mask = 0;
    int i;
  
    for (i = 0; extensions_map[i].name; i++)
!     if (((extensions_map[i].version > 1.0) &&
!          (version >= extensions_map[i].version)) ||
!         _glitz_extension_check (extensions_string, extensions_map[i].name))
        mask |= extensions_map[i].mask;
  

Index: glitzint.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitzint.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** glitzint.h	6 Sep 2004 22:23:29 -0000	1.24
--- glitzint.h	7 Sep 2004 14:28:21 -0000	1.25
***************
*** 461,464 ****
--- 461,465 ----
  
  typedef struct _glitz_extension_map {
+   glitz_gl_float_t version;
    char *name;
    int mask;
***************
*** 478,483 ****
                            glitz_bounding_box_t *return_box);
  
! long int
! glitz_extensions_query (const char *extensions_string,
                          glitz_extension_map *extensions_map);
  
--- 479,485 ----
                            glitz_bounding_box_t *return_box);
  
! unsigned long
! glitz_extensions_query (glitz_gl_float_t version,
!                         const char *extensions_string,
                          glitz_extension_map *extensions_map);
  




More information about the cairo-commit mailing list