diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl index 310f49e..c9c4ab3 100755 --- a/auto/bin/parse_spec.pl +++ b/auto/bin/parse_spec.pl @@ -45,11 +45,7 @@ my %typemap = ( ushort => "GLushort", DMbuffer => "void *", - # ARB VBO introduces these, no idea how to handle them properly. The spec - # file babbles about how great this will be on 64 bit systems, but doesn't - # actually say how to define this nor how to detect that this has been - # defined (i.e., is this tied to the VBO spec or not?). For now I'll just - # use GLEWtype and have it defined in a preamble. (mem, 2003-03-23) + # ARB VBO introduces these. sizeiptrARB => "GLsizeiptrARB", intptrARB => "GLintptrARB", @@ -57,8 +53,8 @@ my %typemap = ( # ARB shader objects introduces these, charARB is at least 8 bits, # handleARB is at least 32 bits charARB => "GLcharARB", - handleARB => "GLhandleARB", - + handleARB => "GLhandleARB", + # GLX 1.3 defines new types which might not be available at compile time #GLXFBConfig => "void*", diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh index f1c160e..c7f18b0 100755 --- a/auto/bin/update_ext.sh +++ b/auto/bin/update_ext.sh @@ -1,91 +1,147 @@ #!/bin/bash # -# Copyright (C) 2003 Marcelo E. Magallon -# Copyright (C) 2003 Milan Ikits +# Copyright (C) 2003-2004 Marcelo E. Magallon +# Copyright (C) 2003-2004 Milan Ikits # # This program is distributed under the terms and conditions of the GNU # General Public License Version 2 as published by the Free Software # Foundation or, at your option, any later version. +# +# Parameters: +# +# $1: Extensions directory +# $2: Registry directory +# $3: The black list set -e if [ ! -d $1 ] ; then mkdir $1 + +# Parse each of the extensions in the registry find $2 -name doc -type d -prune -o -name \*.txt -print | \ grep -v -f $3 | sort | bin/parse_spec.pl $1 + # fix GL_NV_texture_compression_vtc - grep -v EXT $1/GL_NV_texture_compression_vtc > tmp; \ - mv tmp $1/GL_NV_texture_compression_vtc + grep -v EXT $1/GL_NV_texture_compression_vtc > tmp + mv tmp $1/GL_NV_texture_compression_vtc + # remove duplicates from GL_ARB_vertex_program and GL_ARB_fragment_program - grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_fragment_program > tmp; \ - mv tmp $1/GL_ARB_fragment_program + grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_fragment_program > tmp + mv tmp $1/GL_ARB_fragment_program + # remove duplicates from GLX_EXT_visual_rating and GLX_EXT_visual_info - grep -v -F -f $1/GLX_EXT_visual_info $1/GLX_EXT_visual_rating > tmp; \ - mv tmp $1/GLX_EXT_visual_rating + grep -v -F -f $1/GLX_EXT_visual_info $1/GLX_EXT_visual_rating > tmp + mv tmp $1/GLX_EXT_visual_rating + # fix GL_NV_occlusion_query and GL_HP_occlusion_test - grep -v '_HP' $1/GL_NV_occlusion_query > tmp; \ - mv tmp $1/GL_NV_occlusion_query + grep -v '_HP' $1/GL_NV_occlusion_query > tmp + mv tmp $1/GL_NV_occlusion_query + sed -i -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' \ $1/GL_HP_occlusion_test sed -i -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' \ $1/GL_HP_occlusion_test + # fix WGL_ATI_pixel_format_float - echo -e "\tGL_RGBA_FLOAT_MODE_ATI 0x8820" >> $1/WGL_ATI_pixel_format_float - echo -e "\tGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835" >> $1/WGL_ATI_pixel_format_float -# add typedefs to GL_ARB_vertex_buffer_object - echo -e "\ttypedef int GLsizeiptrARB" >> $1/GL_ARB_vertex_buffer_object - echo -e "\ttypedef int GLintptrARB" >> $1/GL_ARB_vertex_buffer_object + cat >> $1/WGL_ATI_pixel_format_float <> $1/GL_ARB_vertex_buffer_object <> $1/GLX_EXT_import_context + cat >> $1/GLX_EXT_import_context <> $1/GLX_OML_swap_method - echo -e "\tGLX_SWAP_COPY_OML 0x8062" >> $1/GLX_OML_swap_method - echo -e "\tGLX_SWAP_UNDEFINED_OML 0x8063" >> $1/GLX_OML_swap_method + cat >> $1/GLX_OML_swap_method <> $1/GLX_SGIX_fbconfig - echo -e "\ttypedef struct __GLXFBConfigRec *GLXFBConfigSGIX" >> $1/GLX_SGIX_fbconfig + cat >> $1/GLX_SGIX_fbconfig <> $1/GLX_SGIX_pbuffer - echo -e "\ttypedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX" >> $1/GLX_SGIX_pbuffer + cat >> $1/GLX_SGIX_pbuffer <> $1/GL_NV_half_float + cat >> $1/GL_NV_half_float <> $1/WGL_ARB_pbuffer + cat >> $1/WGL_ARB_pbuffer <> $1/WGL_EXT_pbuffer + cat >> $1/WGL_EXT_pbuffer < tmp; \ - mv tmp $1/GL_ARB_fragment_shader - grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_vertex_shader > tmp; \ - mv tmp $1/GL_ARB_vertex_shader -# remove duplicates in GL_ARB_vertex_program and GL_ARB_vertex_shader - grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_vertex_shader > tmp; \ - mv tmp $1/GL_ARB_vertex_shader -# remove triplicates in GL_ARB_fragment_program, GL_ARB_fragment_shader, -# and GL_ARB_vertex_shader - grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_fragment_shader > tmp; \ - mv tmp $1/GL_ARB_fragment_shader - grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_vertex_shader > tmp; \ - mv tmp $1/GL_ARB_vertex_shader -# fix bugs in GL_ARB_vertex_shader - grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp; \ - mv tmp $1/GL_ARB_vertex_shader - sed -i -e 's/handle /GLhandleARB /g' $1/GL_ARB_vertex_shader -# fix bugs in GL_ARB_shader_objects - grep -v "GL_FLOAT" $1/GL_ARB_shader_objects > tmp; \ - mv tmp $1/GL_ARB_shader_objects - grep -v "GL_INT" $1/GL_ARB_shader_objects > tmp; \ - mv tmp $1/GL_ARB_shader_objects -# add typedefs to GL_ARB_shader_objects - echo -e "\ttypedef char GLcharARB" >> $1/GL_ARB_shader_objects - echo -e "\ttypedef int GLhandleARB" >> $1/GL_ARB_shader_objects -fi + grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_fragment_shader > tmp + mv tmp $1/GL_ARB_fragment_shader + grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_vertex_shader > tmp + mv tmp $1/GL_ARB_vertex_shader +# remove duplicates in GL_ARB_vertex_program and GL_ARB_vertex_shader + grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_vertex_shader > tmp + mv tmp $1/GL_ARB_vertex_shader + +# remove triplicates in GL_ARB_fragment_program, GL_ARB_fragment_shader, +# and GL_ARB_vertex_shader + grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_fragment_shader + mv tmp $1/GL_ARB_fragment_shader + grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_vertex_shader > tmp + mv tmp $1/GL_ARB_vertex_shader + +# fix bugs in GL_ARB_vertex_shader + grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp + mv tmp $1/GL_ARB_vertex_shader + sed -i -e 's/handle /GLhandleARB /g' $1/GL_ARB_vertex_shader + +# fix bugs in GL_ARB_shader_objects + grep -v "GL_FLOAT" $1/GL_ARB_shader_objects > tmp + mv tmp $1/GL_ARB_shader_objects + grep -v "GL_INT" $1/GL_ARB_shader_objects > tmp + mv tmp $1/GL_ARB_shader_objects + +# add typedefs to GL_ARB_shader_objects + cat >> $1/GL_ARB_shader_objects < + #define GLEW_APIENTRY_DEFINED #define APIENTRY #define GLEWAPI extern