#!/bin/bash ## ## Copyright (C) 2002-2008, Marcelo E. Magallon ## Copyright (C) 2002-2008, 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 # 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 # 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 # GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetBooleanIndexedvEXT but with different parameter names grep -v glGetBooleanIndexedvEXT $1/GL_EXT_transform_feedback > tmp mv tmp $1/GL_EXT_transform_feedback # GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetIntegerIndexedvEXT but with different parameter names grep -v glGetIntegerIndexedvEXT $1/GL_EXT_transform_feedback > tmp mv tmp $1/GL_EXT_transform_feedback # remove duplicates from GL_NV_present_video and GLX_NV_present_video grep -v -F -f $1/GLX_NV_present_video $1/GL_NV_present_video > tmp mv tmp $1/GL_NV_present_video # fix WGL_NV_present_video cat >> $1/WGL_NV_present_video <> $1/WGL_NV_video_output < tmp mv tmp $1/GL_NV_occlusion_query perl -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' -pi \ $1/GL_HP_occlusion_test perl -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' -pi \ $1/GL_HP_occlusion_test # fix GLvoid in GL_ARB_vertex_buffer_objects perl -e 's/ void\*/ GLvoid\*/g' -pi \ $1/GL_ARB_vertex_buffer_object # add deprecated constants to GL_ATI_fragment_shader cat >> $1/GL_ATI_fragment_shader <> $1/GL_NV_texture_shader <> $1/WGL_ATI_pixel_format_float <> $1/WGL_ARB_make_current_read <> $1/WGL_EXT_make_current_read <> $1/GL_ARB_vertex_buffer_object <> $1/GLX_EXT_import_context <> $1/GLX_OML_swap_method <> $1/GLX_SGIX_fbconfig <> $1/GLX_SGIX_pbuffer <> $1/GL_NV_half_float <> $1/WGL_ARB_pbuffer <> $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 # remove duplicates in GL_EXT_direct_state_access grep -v "glGetBooleanIndexedvEXT" $1/GL_EXT_direct_state_access > tmp mv tmp $1/GL_EXT_direct_state_access grep -v "glGetIntegerIndexedvEXT" $1/GL_EXT_direct_state_access > tmp mv tmp $1/GL_EXT_direct_state_access grep -v "glDisableIndexedEXT" $1/GL_EXT_direct_state_access > tmp mv tmp $1/GL_EXT_direct_state_access grep -v "glEnableIndexedEXT" $1/GL_EXT_direct_state_access > tmp mv tmp $1/GL_EXT_direct_state_access grep -v "glIsEnabledIndexedEXT" $1/GL_EXT_direct_state_access > tmp mv tmp $1/GL_EXT_direct_state_access # fix bugs in GL_ARB_vertex_shader grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp mv tmp $1/GL_ARB_vertex_shader perl -e 's/handle /GLhandleARB /g' -pi $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 <> $1/GL_ARB_transpose_matrix <> $1/GL_EXT_framebuffer_multisample <