[cairo-commit] libglc/src glc_glext.h,NONE,1.1 glc_glxext.h,NONE,1.1 Makefile.am,1.9,1.10 glc.c,1.22,1.23 glc.h,1.16,1.17 glc_agl_context.c,1.4,1.5 glc_agl_info.c,1.8,1.9 glc_glx_context.c,1.12,1.13 glc_glx_extension.c,1.14,1.15 glc_glx_format.c,1.17,1.18 glc_glx_info.c,1.13,1.14 glc_glx_pbuffer.c,1.7,1.8 glc_glx_surface.c,1.18,1.19 glc_program.c,1.6,1.7 glc_programmatic.c,1.2,1.3 glc_surface.c,1.20,1.21 glc_texture.c,1.11,1.12 glcint.h,1.23,1.24

David Reveman commit at pdx.freedesktop.org
Mon Aug 15 11:12:59 PDT 2005


Committed by: davidr

Update of /cvs/cairo/libglc/src
In directory pdx:/tmp/cvs-serv18340/src

Modified Files:
	Makefile.am glc.c glc.h glc_agl_context.c glc_agl_info.c 
	glc_glx_context.c glc_glx_extension.c glc_glx_format.c 
	glc_glx_info.c glc_glx_pbuffer.c glc_glx_surface.c 
	glc_program.c glc_programmatic.c glc_surface.c glc_texture.c 
	glcint.h 
Added Files:
	glc_glext.h glc_glxext.h 
Log Message:
Included our own GL extension definitions

--- NEW FILE: glc_glext.h ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: glc_glxext.h ---
(This appears to be a binary file; contents omitted.)

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/libglc/src/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** a/Makefile.am	26 Feb 2004 10:16:04 -0000	1.9
--- b/Makefile.am	6 Mar 2004 13:58:17 -0000	1.10
***************
*** 1,4 ****
  lib_LTLIBRARIES = libglc.la
! include_HEADERS = glc.h glc-features.h
  
  if LIBGLC_HAS_GLX_BACKEND
--- 1,23 ----
  lib_LTLIBRARIES = libglc.la
! 
! if LIBGLC_HAS_GLX_BACKEND
! libglc_glx_headers = \
! 	glc_glxext.h
! else
! libglc_glx_headers =
! endif
! 
! if LIBGLC_HAS_AGL_BACKEND
! libglc_agl_headers =
! else
! libglc_agl_headers =
! endif
! 
! include_HEADERS = \
! 	glc.h \
! 	glc_glext.h \
! 	$(libglc_glx_headers) \
! 	$(libglc_agl_headers) \
! 	glc-features.h
  
  if LIBGLC_HAS_GLX_BACKEND

Index: glc.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** a/glc.c	5 Mar 2004 07:48:22 -0000	1.22
--- b/glc.c	6 Mar 2004 13:58:17 -0000	1.23
***************
*** 76,81 ****
                         int height)
  {
-   
- #if defined(GL_ARB_multitexture) && defined(GL_ARB_fragment_program)
    glc_texture_t *src_texture;
    glc_texture_t *mask_texture;
--- 76,79 ----
***************
*** 303,309 ****
  
    return 1;
- #endif
- 
-   return 0;
  }
  
--- 301,304 ----

Index: glc.h
===================================================================
RCS file: /cvs/cairo/libglc/src/glc.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** a/glc.h	5 Mar 2004 07:48:22 -0000	1.16
--- b/glc.h	6 Mar 2004 13:58:17 -0000	1.17
***************
*** 434,440 ****
  
  unsigned long
- glc_glx_compiled_features (void);
-   
- unsigned long
  glc_glx_features (Display *display,
                    int screen);
--- 434,437 ----
***************
*** 490,496 ****
  
  unsigned long
- glc_agl_compiled_features (void);
-   
- unsigned long
  glc_agl_features (void);
    
--- 487,490 ----

Index: glc_agl_context.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_agl_context.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** a/glc_agl_context.c	16 Feb 2004 22:02:40 -0000	1.4
--- b/glc_agl_context.c	6 Mar 2004 13:58:17 -0000	1.5
***************
*** 81,85 ****
    surface->base.anti_aliasing = 0;
  
- #ifdef GL_ARB_multisample
    if (surface->base.format->multisample.supported) {
      if (surface->base.polyedge == GLC_POLYEDGE_SMOOTH) {
--- 81,84 ----
***************
*** 92,97 ****
        glDisable (GL_MULTISAMPLE_ARB);
    }
- #endif
-   
  }
  
--- 91,94 ----

Index: glc_agl_info.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_agl_info.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** a/glc_agl_info.c	5 Mar 2004 07:48:22 -0000	1.8
--- b/glc_agl_info.c	6 Mar 2004 13:58:17 -0000	1.9
***************
*** 32,35 ****
--- 32,37 ----
  #include "glcint.h"
  
+ #include <OpenGL/glext.h>
+ 
  glc_gl_proc_address_list_t _glc_agl_gl_proc_address = {
    glActiveTextureARB,
***************
*** 145,177 ****
  
  unsigned long
- glc_agl_compiled_features (void)
- {
-   return (GLC_FEATURE_OFFSCREEN_DRAWING_MASK
- 
- #ifdef GL_EXT_texture_rectangle
-           | GLC_FEATURE_TEXTURE_RECTANGLE_MASK
- #endif
-           
- #ifdef GL_NV_texture_rectangle
-           | GLC_FEATURE_TEXTURE_RECTANGLE_MASK
- #endif
-           
- #ifdef GL_ARB_multisample
-           | GLC_FEATURE_MULTISAMPLE_MASK
-           | GLC_FEATURE_OFFSCREEN_MULTISAMPLE_MASK
- #endif
-           
- #if defined(GL_ARB_multitexture) && defined(GL_ARB_fragment_program)
-           | GLC_FEATURE_ARB_VERTEX_PROGRAM_MASK
-           | GLC_FEATURE_ARB_FRAGMENT_PROGRAM_MASK
-           | GLC_FEATURE_CONVOLUTION_FILTER_MASK
-           | GLC_FEATURE_GRADIENT_MASK
- #endif          
-           
-           );
- }
- slim_hidden_def(glc_agl_compiled_features);
-   
- unsigned long
  glc_agl_features (void)
  {
--- 147,150 ----

Index: glc_glx_context.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_context.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** a/glc_glx_context.c	23 Feb 2004 22:38:14 -0000	1.12
--- b/glc_glx_context.c	6 Mar 2004 13:58:17 -0000	1.13
***************
*** 54,62 ****
    context->context = glXCreateContext (screen_info->display_info->display,
                                         &vis_infos[i], share_list, 1);
!   context->id = visualid;
!   
! #ifdef GLX_VERSION_1_3
    context->fbconfig = (XID) 0;
- #endif
  
    XFree (vis_infos);
--- 54,59 ----
    context->context = glXCreateContext (screen_info->display_info->display,
                                         &vis_infos[i], share_list, 1);
!   context->id = visualid;  
    context->fbconfig = (XID) 0;
  
    XFree (vis_infos);
***************
*** 69,74 ****
                                 glc_glx_context_t *context)
  {
-   
- #ifdef GLX_VERSION_1_3
    GLXFBConfig *fbconfigs;
    int i, n_fbconfigs;
--- 66,69 ----
***************
*** 105,110 ****
    if (fbconfigs)
      XFree (fbconfigs);
- #endif
-   
  }
  
--- 100,103 ----
***************
*** 158,163 ****
  glc_glx_context_proc_address_lookup (glc_glx_context_t *context)
  {
-   
- #ifdef GLX_ATI_render_texture
    context->glx_proc_address.glx_bind_tex_image_ati =
      (glc_proc_ptr_bind_tex_image_ati_t)
--- 151,154 ----
***************
*** 166,172 ****
      (glc_proc_ptr_release_tex_image_ati_t)
      glc_glx_get_proc_address ("glXReleaseTexImageATI");
- #endif
  
- #ifdef GL_ARB_multitexture
    context->gl_proc_address.gl_active_texture_arb =
      (glc_proc_ptr_gl_active_texture_arb_t)
--- 157,161 ----
***************
*** 175,181 ****
      (glc_proc_ptr_gl_multi_tex_coord_2d_arb_t)
      glc_glx_get_proc_address ("glMultiTexCoord2dARB");
- #endif
  
- #ifdef GL_ARB_fragment_program
    context->gl_proc_address.gl_gen_programs_arb =
      (glc_proc_ptr_gl_gen_programs_arb_t)
--- 164,168 ----
***************
*** 196,200 ****
      (glc_proc_ptr_gl_get_program_iv_arb_t)
      glc_glx_get_proc_address ("glGetProgramivARB");
- #endif
  
    context->gl_proc_address.supported = 0;
--- 183,186 ----
***************
*** 207,211 ****
    surface->base.anti_aliasing = 0;
  
- #ifdef GL_ARB_multisample
    if (surface->base.format->multisample.supported) {
      if (surface->base.polyedge == GLC_POLYEDGE_SMOOTH) {
--- 193,196 ----
***************
*** 218,223 ****
        glDisable (GL_MULTISAMPLE_ARB);
    }
- #endif
-   
  }
  
--- 203,206 ----

Index: glc_glx_extension.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_extension.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** a/glc_glx_extension.c	5 Mar 2004 07:48:22 -0000	1.14
--- b/glc_glx_extension.c	6 Mar 2004 13:58:17 -0000	1.15
***************
*** 83,87 ****
    screen_info->texture_mask = GLC_TEXTURE_TARGET_2D_MASK;
  
- #ifdef GLX_VERSION_1_3
    if (_glc_glx_proc_address.glx_get_fbconfigs &&
        _glc_glx_proc_address.glx_get_fbconfig_attrib &&
--- 83,86 ----
***************
*** 92,98 ****
      screen_info->glx_feature_mask |= GLC_GLX_FEATURE_GLX13_MASK;
    }
- #endif
  
- #ifdef GL_ARB_multisample
    if (screen_info->glx_feature_mask & GLC_GLX_FEATURE_MULTISAMPLE_MASK &&
        screen_info->glx_feature_mask &
--- 91,95 ----
***************
*** 104,108 ****
        screen_info->feature_mask |= GLC_FEATURE_OFFSCREEN_MULTISAMPLE_MASK;
    }
- #endif
  
    if (screen_info->glx_feature_mask & GLC_GLX_FEATURE_TEXTURE_NPOT_MASK) {
--- 101,104 ----
***************
*** 111,126 ****
    }
  
- #if defined(GL_EXT_texture_rectangle) || defined(GL_NV_texture_rectangle)  
    if (screen_info->glx_feature_mask & GLC_GLX_FEATURE_TEXTURE_RECTANGLE_MASK) {
      screen_info->texture_mask |= GLC_TEXTURE_TARGET_RECTANGLE_MASK;
      screen_info->feature_mask |= GLC_FEATURE_TEXTURE_RECTANGLE_MASK;
    }
- #endif
  
    if (screen_info->glx_feature_mask &
        GLC_GLX_FEATURE_ATI_RENDER_TEXTURE_MASK) {
-     screen_info->glx_feature_mask &= ~GLC_GLX_FEATURE_ATI_RENDER_TEXTURE_MASK;
- 
- #ifdef GLX_ATI_render_texture
      screen_info->glx_feature_mask |= GLC_GLX_FEATURE_ATI_RENDER_TEXTURE_MASK;
      screen_info->feature_mask |= GLC_FEATURE_ATI_RENDER_TEXTURE_MASK;
--- 107,117 ----
***************
*** 129,161 ****
      screen_info->texture_mask &= ~GLC_TEXTURE_TARGET_RECTANGLE_MASK;
      screen_info->feature_mask &= ~GLC_FEATURE_TEXTURE_RECTANGLE_MASK;
- #endif
-     
    }
  
    if (screen_info->glx_feature_mask &
        GLC_GLX_FEATURE_ARB_VERTEX_PROGRAM_MASK) {
!     screen_info->glx_feature_mask &=
!       ~GLC_GLX_FEATURE_ARB_VERTEX_PROGRAM_MASK;
!     
! #if defined(GL_ARB_multitexture) && defined(GL_ARB_vertex_program)
!     screen_info->glx_feature_mask |=
!       GLC_GLX_FEATURE_ARB_VERTEX_PROGRAM_MASK;
!     screen_info->feature_mask |= GLC_FEATURE_ARB_VERTEX_PROGRAM_MASK;
! #endif
!     
    }
  
    if (screen_info->glx_feature_mask &
        GLC_GLX_FEATURE_ARB_FRAGMENT_PROGRAM_MASK) {
!     screen_info->glx_feature_mask &=
!       ~GLC_GLX_FEATURE_ARB_FRAGMENT_PROGRAM_MASK;
!     
! #if defined(GL_ARB_multitexture) && defined(GL_ARB_fragment_program)
!     screen_info->glx_feature_mask |=
!       GLC_GLX_FEATURE_ARB_FRAGMENT_PROGRAM_MASK;
      screen_info->feature_mask |= GLC_FEATURE_ARB_FRAGMENT_PROGRAM_MASK;
      screen_info->feature_mask |= GLC_FEATURE_GRADIENT_MASK;
- #endif
-     
    }
  
--- 120,136 ----
      screen_info->texture_mask &= ~GLC_TEXTURE_TARGET_RECTANGLE_MASK;
      screen_info->feature_mask &= ~GLC_FEATURE_TEXTURE_RECTANGLE_MASK;
    }
  
    if (screen_info->glx_feature_mask &
        GLC_GLX_FEATURE_ARB_VERTEX_PROGRAM_MASK) {
!     screen_info->glx_feature_mask |= GLC_GLX_FEATURE_ARB_VERTEX_PROGRAM_MASK;
!     screen_info->feature_mask |= GLC_FEATURE_ARB_VERTEX_PROGRAM_MASK;    
    }
  
    if (screen_info->glx_feature_mask &
        GLC_GLX_FEATURE_ARB_FRAGMENT_PROGRAM_MASK) {
!     screen_info->glx_feature_mask |= GLC_GLX_FEATURE_ARB_FRAGMENT_PROGRAM_MASK;
      screen_info->feature_mask |= GLC_FEATURE_ARB_FRAGMENT_PROGRAM_MASK;
      screen_info->feature_mask |= GLC_FEATURE_GRADIENT_MASK;
    }
  

Index: glc_glx_format.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_format.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** a/glc_glx_format.c	5 Mar 2004 07:48:22 -0000	1.17
--- b/glc_glx_format.c	6 Mar 2004 13:58:17 -0000	1.18
***************
*** 156,167 ****
  
      if (screen_info->feature_mask & GLC_FEATURE_MULTISAMPLE_MASK) {
-       
- #ifdef GL_ARB_multisample
        glXGetConfig (display, &visuals[i], GLX_SAMPLE_BUFFERS_ARB, &value);
        format.multisample.supported = (value) ? 1: 0;
        glXGetConfig (display, &visuals[i], GLX_SAMPLES_ARB, &value);
        format.multisample.samples = (unsigned short) value;
- #endif
-       
      } else {
        format.multisample.supported = 0;
--- 156,163 ----
***************
*** 206,210 ****
  }
  
- #ifdef GLX_VERSION_1_3
  static glc_bool_t
  glc_glx_query_formats_glx13 (glc_glx_screen_info_t *screen_info)
--- 202,205 ----
***************
*** 275,280 ****
      
      if (screen_info->feature_mask & GLC_FEATURE_MULTISAMPLE_MASK) {
- 
- #ifdef GL_ARB_multisample
        _glc_glx_proc_address.glx_get_fbconfig_attrib (display, fbconfigs[i],
                                                       GLX_SAMPLE_BUFFERS_ARB,
--- 270,273 ----
***************
*** 284,289 ****
                                                       GLX_SAMPLES_ARB, &value);
        format.multisample.samples = (unsigned short) value;
- #endif
-       
      } else {
        format.multisample.supported = 0;
--- 277,280 ----
***************
*** 337,341 ****
    return 0;
  }
- #endif
  
  void
--- 328,331 ----
***************
*** 344,351 ****
    glc_bool_t status = 1;
  
- #ifdef GLX_VERSION_1_3
    if (screen_info->feature_mask & GLC_FEATURE_OFFSCREEN_DRAWING_MASK)
      status = glc_glx_query_formats_glx13 (screen_info);
- #endif
  
    if (status)
--- 334,339 ----
***************
*** 396,400 ****
    if (screen_info->feature_mask & GLC_FEATURE_OFFSCREEN_DRAWING_MASK) {
  
- #ifdef GLX_VERSION_1_3
      GLXFBConfig *fbconfigs;
      int i, n_fbconfigs;
--- 384,387 ----
***************
*** 419,423 ****
      if (fbconfigs)
        XFree (fbconfigs);
- #endif
      
    } else {
--- 406,409 ----

Index: glc_glx_info.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_info.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** a/glc_glx_info.c	5 Mar 2004 07:48:22 -0000	1.13
--- b/glc_glx_info.c	6 Mar 2004 13:58:17 -0000	1.14
***************
*** 35,40 ****
  
  glc_glx_static_proc_address_list_t _glc_glx_proc_address = {
- 
- #ifdef GLX_VERSION_1_3
    NULL,
    NULL,
--- 35,38 ----
***************
*** 42,47 ****
    NULL,
    NULL,
- #endif
-   
    0
  };
--- 40,43 ----
***************
*** 75,86 ****
  {
    _glc_glx_proc_address.supported = 1;
-   
- #ifdef GLX_ARB_get_proc_address
    glc_glx_get_proc_address_arb =
      (glc_proc_ptr_get_proc_address_arb_t)
      glc_glx_get_proc_address ("glXGetProcAddressARB");
- #endif
- 
- #ifdef GLX_VERSION_1_3
    _glc_glx_proc_address.glx_get_fbconfigs =
      (glc_proc_ptr_glx_get_fbconfigs_t)
--- 71,77 ----
***************
*** 98,103 ****
      (glc_proc_ptr_glx_destroy_pbuffer_t)
      glc_glx_get_proc_address ("glXDestroyPbuffer");
- #endif
-   
  }
  
--- 89,92 ----
***************
*** 206,213 ****
      glXCreateContext (display, vinfo, NULL, 1);
  
! #ifdef GLX_VERSION_1_3
!   screen_info->root_context.fbconfig = (XID) 0;
! #endif
!   
    screen_info->root_context.id = vinfo->visualid;
  
--- 195,199 ----
      glXCreateContext (display, vinfo, NULL, 1);
  
!   screen_info->root_context.fbconfig = (XID) 0;  
    screen_info->root_context.id = vinfo->visualid;
  
***************
*** 289,333 ****
  
  unsigned long
- glc_glx_compiled_features (void)
- {
-   return (0
- 
- #ifdef GLX_VERSION_1_3
-           | GLC_FEATURE_OFFSCREEN_DRAWING_MASK
- #endif
- 
- #ifdef GL_EXT_texture_rectangle
-           | GLC_FEATURE_TEXTURE_RECTANGLE_MASK
- #endif
- 
- #ifdef GL_NV_texture_rectangle
-           | GLC_FEATURE_TEXTURE_RECTANGLE_MASK
- #endif
-           
- #ifdef GL_ARB_multisample
-           | GLC_FEATURE_MULTISAMPLE_MASK
-           
- #ifdef GLX_VERSION_1_3
-           | GLC_FEATURE_OFFSCREEN_MULTISAMPLE_MASK
- #endif
-           
- #endif
-           
- #if defined(GL_ARB_multitexture) && defined(GL_ARB_fragment_program)
-           | GLC_FEATURE_ARB_VERTEX_PROGRAM_MASK
-           | GLC_FEATURE_ARB_FRAGMENT_PROGRAM_MASK
-           | GLC_FEATURE_CONVOLUTION_FILTER_MASK
-           | GLC_FEATURE_GRADIENT_MASK
- #endif
-           
- #ifdef GLX_ATI_render_texture
-           | GLC_FEATURE_ATI_RENDER_TEXTURE_MASK
- #endif
-           
-           );
- }
- slim_hidden_def(glc_glx_compiled_features);
- 
- unsigned long
  glc_glx_features (Display *display,
                    int screen)
--- 275,278 ----

Index: glc_glx_pbuffer.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_pbuffer.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** a/glc_glx_pbuffer.c	18 Feb 2004 14:52:45 -0000	1.7
--- b/glc_glx_pbuffer.c	6 Mar 2004 13:58:17 -0000	1.8
***************
*** 34,38 ****
  extern glc_glx_static_proc_address_list_t _glc_glx_proc_address;
  
- #ifdef GLX_VERSION_1_3
  GLXPbuffer
  glc_glx_pbuffer_create (Display *display,
--- 34,37 ----
***************
*** 52,64 ****
    pbuffer_attr[i++] = 0;
  
!   if (render_texture) {
!     
! #ifdef GLX_ATI_render_texture
      pbuffer_attr[i++] = GLX_TEXTURE_FORMAT_ATI;
      pbuffer_attr[i++] = GLX_TEXTURE_RGBA_ATI;
      pbuffer_attr[i++] = GLX_TEXTURE_TARGET_ATI;
      pbuffer_attr[i++] = GLX_TEXTURE_2D_ATI;
- #endif
-     
    }
  
--- 51,59 ----
    pbuffer_attr[i++] = 0;
  
!   if (render_texture) {    
      pbuffer_attr[i++] = GLX_TEXTURE_FORMAT_ATI;
      pbuffer_attr[i++] = GLX_TEXTURE_RGBA_ATI;
      pbuffer_attr[i++] = GLX_TEXTURE_TARGET_ATI;
      pbuffer_attr[i++] = GLX_TEXTURE_2D_ATI;
    }
  
***************
*** 75,77 ****
    _glc_glx_proc_address.glx_destroy_pbuffer (display, pbuffer);
  }
- #endif
--- 70,71 ----

Index: glc_glx_surface.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_surface.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** a/glc_glx_surface.c	5 Mar 2004 07:48:22 -0000	1.18
--- b/glc_glx_surface.c	6 Mar 2004 13:58:17 -0000	1.19
***************
*** 58,69 ****
    if (constraint == GLC_CN_SURFACE_DRAWABLE_CURRENT) {
      if (surface->render_texture) {
-       
- #ifdef GLX_ATI_render_texture
        surface->context->glx_proc_address.glx_release_tex_image_ati
          (surface->screen_info->display_info->display, surface->pbuffer,
           (surface->base.format->doublebuffer)?
           GLX_BACK_LEFT_ATI: GLX_FRONT_LEFT_ATI);
- #endif
-       
      }
      if (!surface->drawable)
--- 58,65 ----
***************
*** 130,140 ****
    if (surface->render_texture) {
      glc_texture_bind (surface->base.texture);
-     
- #ifdef GLX_ATI_render_texture
      surface->context->glx_proc_address.glx_bind_tex_image_ati
        (surface->screen_info->display_info->display, surface->pbuffer,
         (surface->base.format->doublebuffer)?
         GLX_BACK_LEFT_ATI: GLX_FRONT_LEFT_ATI);
- #endif
      
      glc_texture_unbind (surface->base.texture);
--- 126,133 ----
***************
*** 178,182 ****
    }
    
- #ifdef GLX_ATI_render_texture
    if ((surface->screen_info->feature_mask &
         GLC_FEATURE_ATI_RENDER_TEXTURE_MASK) &&
--- 171,174 ----
***************
*** 184,190 ****
        surface->context->glx_proc_address.glx_release_tex_image_ati)
      surface->base.feature_mask |= GLC_FEATURE_ATI_RENDER_TEXTURE_MASK;
- #endif
  
- #if defined(GL_ARB_multitexture) && defined(GL_ARB_fragment_program)
    if (surface->context->gl_proc_address.gl_active_texture_arb &&
        surface->context->gl_proc_address.gl_multi_tex_coord_2d_arb &&
--- 176,180 ----
***************
*** 220,224 ****
      }
    }
- #endif
  
    if (surface->base.format->multisample.supported) {
--- 210,213 ----
***************
*** 274,278 ****
    }
  
- #ifdef GLX_VERSION_1_3
    if (screen_info->feature_mask & GLC_FEATURE_OFFSCREEN_DRAWING_MASK)
      surface->drawable = surface->pbuffer =
--- 263,266 ----
***************
*** 281,285 ****
                                surface->base.texture,
                                surface->render_texture);
- #endif
  
    _glc_glx_set_features (surface);
--- 269,272 ----
***************
*** 394,405 ****
  
    if (surface->render_texture) {
-     
- #ifdef GLX_ATI_render_texture
      surface->context->glx_proc_address.glx_release_tex_image_ati
        (surface->screen_info->display_info->display, surface->pbuffer,
         (surface->base.format->doublebuffer)?
         GLX_BACK_LEFT_ATI: GLX_FRONT_LEFT_ATI);
- #endif
-     
      }
    
--- 381,388 ----
***************
*** 407,415 ****
      glc_texture_destroy (surface->base.texture);
  
- #ifdef GLX_VERSION_1_3
    if (surface->pbuffer)
      glc_glx_pbuffer_destroy (surface->screen_info->display_info->display,
                               surface->pbuffer);
- #endif
    
    glc_surface_pop_current (&surface->base);
--- 390,396 ----

Index: glc_program.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_program.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** a/glc_program.c	5 Mar 2004 07:48:22 -0000	1.6
--- b/glc_program.c	6 Mar 2004 13:58:17 -0000	1.7
***************
*** 125,130 ****
  };
  
- #ifdef GL_ARB_fragment_program
- 
  /*
   * Passes texture coordinates to convolution filter
--- 125,128 ----
***************
*** 602,607 ****
  }
  
- #endif
- 
  static glc_bool_t
  glc_program_enable_programmatic (glc_surface_t *dst,
--- 600,603 ----
***************
*** 632,636 ****
    }
  
- #ifdef GL_ARB_fragment_program
    if (dst->feature_mask & GLC_FEATURE_ARB_FRAGMENT_PROGRAM_MASK) {
      if (!programs->fragment_programmatic[type_offset])
--- 628,631 ----
***************
*** 649,653 ****
      }
    }
- #endif
    
    return 0;
--- 644,647 ----
***************
*** 677,681 ****
                                         GLC_PROGRAM_SRC_OPERATION_OFFSET);
  
- #ifdef GL_ARB_fragment_program
    if (dst->feature_mask & GLC_FEATURE_ARB_FRAGMENT_PROGRAM_MASK) {
      if (mask && mask->programmatic)
--- 671,674 ----
***************
*** 713,717 ****
                                   mask_texture);
    }
- #endif
    
    return 0;
--- 706,709 ----
***************
*** 721,731 ****
  glc_program_disable (glc_surface_t *dst)
  {
!   
! #ifdef GL_ARB_fragment_program
!   dst->proc_address->gl_bind_program_arb (GL_FRAGMENT_PROGRAM_ARB, 0);
!   glDisable (GL_FRAGMENT_PROGRAM_ARB);
!   dst->proc_address->gl_bind_program_arb (GL_VERTEX_PROGRAM_ARB, 0);
!   glDisable (GL_VERTEX_PROGRAM_ARB);
! #endif
!   
  }
--- 713,721 ----
  glc_program_disable (glc_surface_t *dst)
  {
!   if (dst->feature_mask & GLC_FEATURE_ARB_FRAGMENT_PROGRAM_MASK) {
!     dst->proc_address->gl_bind_program_arb (GL_FRAGMENT_PROGRAM_ARB, 0);
!     glDisable (GL_FRAGMENT_PROGRAM_ARB);
!     dst->proc_address->gl_bind_program_arb (GL_VERTEX_PROGRAM_ARB, 0);
!     glDisable (GL_VERTEX_PROGRAM_ARB);
!   }
  }

Index: glc_programmatic.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_programmatic.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/glc_programmatic.c	5 Mar 2004 07:48:23 -0000	1.2
--- b/glc_programmatic.c	6 Mar 2004 13:58:17 -0000	1.3
***************
*** 217,222 ****
                  solid->color.alpha);
    } break;
- 
- #ifdef GL_ARB_fragment_program
    case GLC_PROGRAMMATIC_SURFACE_LINEAR_GRADIENT_TYPE: {
      glc_linear_gradient_t *gradient = &surface->attributes.linear_gradient;
--- 217,220 ----
***************
*** 288,296 ****
         0.0);
    } break;
- #endif
-   
    default:
      break;
    }
-   
  }
--- 286,291 ----

Index: glc_surface.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_surface.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** a/glc_surface.c	5 Mar 2004 07:48:23 -0000	1.20
--- b/glc_surface.c	6 Mar 2004 13:58:17 -0000	1.21
***************
*** 122,127 ****
  glc_surface_disable_program (glc_surface_t *surface)
  {
!   if (surface->feature_mask & GLC_FEATURE_ARB_FRAGMENT_PROGRAM_MASK)
!     glc_program_disable (surface);
  }
  
--- 122,126 ----
  glc_surface_disable_program (glc_surface_t *surface)
  {
!   glc_program_disable (surface);
  }
  

Index: glc_texture.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_texture.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** a/glc_texture.c	5 Mar 2004 07:48:23 -0000	1.11
--- b/glc_texture.c	6 Mar 2004 13:58:17 -0000	1.12
***************
*** 53,65 ****
        (!_glc_texture_is_power_of_two (width)) ||
        (!_glc_texture_is_power_of_two (height))) {
!     if (target_mask & GLC_TEXTURE_TARGET_RECTANGLE_MASK) {
! 
! #ifdef GL_EXT_texture_rectangle
        *target = GL_TEXTURE_RECTANGLE_EXT;
- #else
-       *target = GL_TEXTURE_RECTANGLE_NV;
- #endif
-       
-     }
    }
  }
--- 53,58 ----
        (!_glc_texture_is_power_of_two (width)) ||
        (!_glc_texture_is_power_of_two (height))) {
!     if (target_mask & GLC_TEXTURE_TARGET_RECTANGLE_MASK)
        *target = GL_TEXTURE_RECTANGLE_EXT;
    }
  }
***************
*** 198,207 ****
  {
    
- #if defined(GL_EXT_texture_rectangle)
    glDisable (GL_TEXTURE_RECTANGLE_EXT);
- #elif defined(GL_NV_texture_rectangle)
-   glDisable (GL_TEXTURE_RECTANGLE_NV);
- #endif
-   
    glDisable (GL_TEXTURE_2D);
  
--- 191,195 ----

Index: glcint.h
===================================================================
RCS file: /cvs/cairo/libglc/src/glcint.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** a/glcint.h	5 Mar 2004 07:48:23 -0000	1.23
--- b/glcint.h	6 Mar 2004 13:58:17 -0000	1.24
***************
*** 81,115 ****
  #ifdef LIBGLC_HAS_AGL_BACKEND
  #include <OpenGL/gl.h>
- #include <OpenGL/glext.h>
  #else
  #include <GL/gl.h>
- #include <GL/glext.h>
  #endif
  
! typedef void (* glc_proc_ptr_gl_active_texture_arb_t)
!      (GLenum);
! typedef void (* glc_proc_ptr_gl_multi_tex_coord_2d_arb_t)
!      (GLenum, GLdouble, GLdouble);
! typedef void (* glc_proc_ptr_gl_gen_programs_arb_t)
!      (GLsizei, GLuint *);
! typedef void (* glc_proc_ptr_gl_delete_programs_arb_t)
!      (GLsizei, const GLuint *);
! typedef void (* glc_proc_ptr_gl_program_string_arb_t)
!      (GLenum, GLenum, GLsizei, const GLvoid *);
! typedef void (* glc_proc_ptr_gl_bind_program_arb_t)
!      (GLenum, GLuint);
! typedef void (* glc_proc_ptr_gl_program_local_param_4d_arb_t)
!      (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
! typedef void (* glc_proc_ptr_gl_get_program_iv_arb_t)
!      (GLenum, GLenum, GLuint *);
  
  typedef struct _glc_gl_proc_address_list_t {
- 
- #ifdef GL_ARB_multitexture
    glc_proc_ptr_gl_active_texture_arb_t gl_active_texture_arb;
    glc_proc_ptr_gl_multi_tex_coord_2d_arb_t gl_multi_tex_coord_2d_arb;
- #endif
-     
- #ifdef GL_ARB_fragment_program
    glc_proc_ptr_gl_gen_programs_arb_t gl_gen_programs_arb;
    glc_proc_ptr_gl_delete_programs_arb_t gl_delete_programs_arb;
--- 81,93 ----
  #ifdef LIBGLC_HAS_AGL_BACKEND
  #include <OpenGL/gl.h>
  #else
  #include <GL/gl.h>
  #endif
  
! #include "glc_glext.h"
  
  typedef struct _glc_gl_proc_address_list_t {
    glc_proc_ptr_gl_active_texture_arb_t gl_active_texture_arb;
    glc_proc_ptr_gl_multi_tex_coord_2d_arb_t gl_multi_tex_coord_2d_arb;
    glc_proc_ptr_gl_gen_programs_arb_t gl_gen_programs_arb;
    glc_proc_ptr_gl_delete_programs_arb_t gl_delete_programs_arb;
***************
*** 118,123 ****
    glc_proc_ptr_gl_program_local_param_4d_arb_t gl_program_local_param_4d_arb;
    glc_proc_ptr_gl_get_program_iv_arb_t gl_get_program_iv_arb;
- #endif
- 
    glc_bool_t supported;
  } glc_gl_proc_address_list_t;
--- 96,99 ----
***************
*** 558,566 ****
  
  #include <GL/glx.h>
- #include <GL/glxext.h>
  
! #ifdef HAVE_GL_GLXATI_H
! #  include <GL/glxATI.h>
! #endif
  
  #define GLC_GLX_FEATURE_TEXTURE_RECTANGLE_MASK    (1L << 0)
--- 534,539 ----
  
  #include <GL/glx.h>
  
! #include "glc_glxext.h"
  
  #define GLC_GLX_FEATURE_TEXTURE_RECTANGLE_MASK    (1L << 0)
***************
*** 578,604 ****
  typedef struct _glc_glx_display_info_t glc_glx_display_info_t;
  
- #ifdef GLX_VERSION_1_3
- typedef GLXFBConfig *(* glc_proc_ptr_glx_get_fbconfigs_t)
-      (Display *, int, int *);
- typedef int (* glc_proc_ptr_glx_get_fbconfig_attrib_t)
-      (Display *, GLXFBConfig, int, int *);
- typedef XVisualInfo *(* glc_proc_ptr_glx_get_visual_from_fbconfig_t)
-      (Display *, GLXFBConfig);
- typedef GLXPbuffer (* glc_proc_ptr_glx_create_pbuffer_t)
-      (Display *, GLXFBConfig, const int *);
- typedef void (* glc_proc_ptr_glx_destroy_pbuffer_t)
-      (Display *, GLXPbuffer);
- #endif
- 
- #ifdef GLX_ATI_render_texture
- typedef void (* glc_proc_ptr_bind_tex_image_ati_t)
-      (Display *, GLXPbuffer, int);
- typedef void (* glc_proc_ptr_release_tex_image_ati_t)
-      (Display *, GLXPbuffer, int);
- #endif
- 
  typedef struct _glc_glx_static_proc_address_list_t {
- 
- #ifdef GLX_VERSION_1_3
    glc_proc_ptr_glx_get_fbconfigs_t glx_get_fbconfigs;
    glc_proc_ptr_glx_get_fbconfig_attrib_t glx_get_fbconfig_attrib;
--- 551,555 ----
***************
*** 606,621 ****
    glc_proc_ptr_glx_create_pbuffer_t glx_create_pbuffer;
    glc_proc_ptr_glx_destroy_pbuffer_t glx_destroy_pbuffer;
- #endif
-   
    glc_bool_t supported;
  } glc_glx_static_proc_address_list_t;
  
  typedef struct _glc_glx_proc_address_list_t {
- 
- #ifdef GLX_ATI_render_texture
    glc_proc_ptr_bind_tex_image_ati_t glx_bind_tex_image_ati;
    glc_proc_ptr_release_tex_image_ati_t glx_release_tex_image_ati;
- #endif
- 
    glc_bool_t supported;
  } glc_glx_proc_address_list_t;
--- 557,566 ----
***************
*** 643,651 ****
    glc_gl_proc_address_list_t gl_proc_address;
    glc_glx_proc_address_list_t glx_proc_address;
-   
- #ifdef GLX_VERSION_1_3
    GLXFBConfig fbconfig;
- #endif
-   
  } glc_glx_context_t;
  
--- 588,592 ----
***************
*** 723,727 ****
  glc_glx_query_formats (glc_glx_screen_info_t *screen_info);
  
- #ifdef GLX_VERSION_1_3
  extern GLXPbuffer __internal_linkage
  glc_glx_pbuffer_create (Display *display,
--- 664,667 ----
***************
*** 733,742 ****
  glc_glx_pbuffer_destroy (Display *display,
                           GLXPbuffer pbuffer);
- #endif
  
  /* Avoid unnecessary PLT entries.  */
  
  slim_hidden_proto(glc_glx_initialize)
- slim_hidden_proto(glc_glx_compiled_features)
  slim_hidden_proto(glc_glx_features)
  slim_hidden_proto(glc_glx_find_format)
--- 673,680 ----
***************
*** 845,849 ****
  
  slim_hidden_proto(glc_agl_initialize)
- slim_hidden_proto(glc_agl_compiled_features)
  slim_hidden_proto(glc_agl_features)
  slim_hidden_proto(glc_agl_find_format)
--- 783,786 ----





More information about the cairo-commit mailing list