Browse files

Import to git

  • Loading branch information...
0 parents commit 2fae9589ecf0c8d6c80e25bba629ed4de95aa342 @drahosp drahosp committed Oct 1, 2010
Showing with 7,795 additions and 0 deletions.
  1. +26 −0 CMakeLists.txt
  2. +73 −0 LICENSE.txt
  3. +268 −0 Makefile
  4. +18 −0 README.txt
  5. +12 −0 TODO.txt
  6. +371 −0 auto/Makefile
  7. +18 −0 auto/bin/fix_OML_sync_control.sh
  8. +188 −0 auto/bin/make.pl
  9. +35 −0 auto/bin/make_def_fun.pl
  10. +31 −0 auto/bin/make_def_var.pl
  11. +71 −0 auto/bin/make_header.pl
  12. +55 −0 auto/bin/make_html.pl
  13. +59 −0 auto/bin/make_info.pl
  14. +47 −0 auto/bin/make_info_list.pl
  15. +55 −0 auto/bin/make_init.pl
  16. +66 −0 auto/bin/make_list.pl
  17. +53 −0 auto/bin/make_str.pl
  18. +36 −0 auto/bin/make_struct_fun.pl
  19. +31 −0 auto/bin/make_struct_var.pl
  20. +335 −0 auto/bin/parse_spec.pl
  21. +280 −0 auto/bin/update_ext.sh
  22. +24 −0 auto/bin/update_registry.sh
  23. +15 −0 auto/blacklist
  24. +4 −0 auto/core/GLX_ARB_get_proc_address
  25. +4 −0 auto/core/GLX_ATI_pixel_format_float
  26. +41 −0 auto/core/GLX_ATI_render_texture
  27. +5 −0 auto/core/GLX_EXT_fbconfig_packed_float
  28. +4 −0 auto/core/GLX_EXT_framebuffer_sRGB
  29. +4 −0 auto/core/GLX_NV_float_buffer
  30. +5 −0 auto/core/GLX_NV_vertex_array_range
  31. +5 −0 auto/core/GLX_SGIS_shared_multisample
  32. +25 −0 auto/core/GLX_SGIX_hyperpipe
  33. +5 −0 auto/core/GLX_SGIX_swap_barrier
  34. +4 −0 auto/core/GLX_SGIX_swap_group
  35. +7 −0 auto/core/GLX_SUN_video_resize
  36. +4 −0 auto/core/GLX_VERSION_1_2
  37. +82 −0 auto/core/GLX_VERSION_1_3
  38. +6 −0 auto/core/GLX_VERSION_1_4
  39. +17 −0 auto/core/GL_APPLE_float_pixels
  40. +4 −0 auto/core/GL_APPLE_pixel_buffer
  41. +12 −0 auto/core/GL_APPLE_texture_range
  42. +112 −0 auto/core/GL_ARB_imaging
  43. +18 −0 auto/core/GL_ARB_matrix_palette
  44. +72 −0 auto/core/GL_ARB_multitexture
  45. +55 −0 auto/core/GL_ARB_vertex_blend
  46. +9 −0 auto/core/GL_ATIX_point_sprites
  47. +6 −0 auto/core/GL_ATIX_texture_env_combine3
  48. +6 −0 auto/core/GL_ATIX_texture_env_route
  49. +4 −0 auto/core/GL_ATIX_vertex_shader_output_point_size
  50. +15 −0 auto/core/GL_ATI_envmap_bumpmap
  51. +5 −0 auto/core/GL_ATI_map_object_buffer
  52. +14 −0 auto/core/GL_ATI_pn_triangles
  53. +9 −0 auto/core/GL_ATI_separate_stencil
  54. +3 −0 auto/core/GL_ATI_shader_texture_lod
  55. +4 −0 auto/core/GL_ATI_texture_compression_3dc
  56. +50 −0 auto/core/GL_ATI_vertex_streams
  57. +5 −0 auto/core/GL_EXT_Cg_shader
  58. +12 −0 auto/core/GL_EXT_bindable_uniform
  59. +6 −0 auto/core/GL_EXT_depth_bounds_test
  60. +5 −0 auto/core/GL_EXT_draw_instanced
  61. +6 −0 auto/core/GL_EXT_draw_range_elements
  62. +16 −0 auto/core/GL_EXT_fog_coord
  63. +5 −0 auto/core/GL_EXT_framebuffer_sRGB
  64. +27 −0 auto/core/GL_EXT_geometry_shader4
  65. +5 −0 auto/core/GL_EXT_gpu_program_parameters
  66. +63 −0 auto/core/GL_EXT_gpu_shader4
  67. +6 −0 auto/core/GL_EXT_packed_float
  68. +7 −0 auto/core/GL_EXT_pixel_buffer_object
  69. +27 −0 auto/core/GL_EXT_secondary_color
  70. +11 −0 auto/core/GL_EXT_texture_array
  71. +9 −0 auto/core/GL_EXT_texture_buffer_object
  72. +7 −0 auto/core/GL_EXT_texture_compression_latc
  73. +7 −0 auto/core/GL_EXT_texture_compression_rgtc
  74. +15 −0 auto/core/GL_EXT_texture_cube_map
  75. +4 −0 auto/core/GL_EXT_texture_edge_clamp
  76. +56 −0 auto/core/GL_EXT_texture_integer
  77. +7 −0 auto/core/GL_EXT_texture_rectangle
  78. +6 −0 auto/core/GL_EXT_texture_shared_exponent
  79. +6 −0 auto/core/GL_EXT_timer_query
  80. +156 −0 auto/core/GL_EXT_vertex_shader
  81. +12 −0 auto/core/GL_KTX_buffer_region
  82. +10 −0 auto/core/GL_NV_depth_buffer_float
  83. +8 −0 auto/core/GL_NV_depth_range_unclamped
  84. +8 −0 auto/core/GL_NV_fragment_program2
  85. +3 −0 auto/core/GL_NV_fragment_program4
  86. +3 −0 auto/core/GL_NV_fragment_program_option
  87. +8 −0 auto/core/GL_NV_framebuffer_multisample_coverage
  88. +7 −0 auto/core/GL_NV_geometry_program4
  89. +3 −0 auto/core/GL_NV_geometry_shader4
  90. +23 −0 auto/core/GL_NV_gpu_program4
  91. +11 −0 auto/core/GL_NV_parameter_buffer_object
  92. +15 −0 auto/core/GL_NV_present_video
  93. +8 −0 auto/core/GL_NV_tessellation_program5
  94. +39 −0 auto/core/GL_NV_transform_feedback
  95. +5 −0 auto/core/GL_NV_vertex_program2_option
  96. +4 −0 auto/core/GL_NV_vertex_program3
  97. +3 −0 auto/core/GL_NV_vertex_program4
  98. +7 −0 auto/core/GL_SGIX_shadow
  99. +4 −0 auto/core/GL_SUN_read_video_pixels
  100. +48 −0 auto/core/GL_VERSION_1_2
  101. +146 −0 auto/core/GL_VERSION_1_3
  102. +89 −0 auto/core/GL_VERSION_1_4
  103. +74 −0 auto/core/GL_VERSION_1_5
  104. +181 −0 auto/core/GL_VERSION_2_0
  105. +32 −0 auto/core/GL_VERSION_2_1
  106. +166 −0 auto/core/GL_VERSION_3_0
  107. +41 −0 auto/core/GL_VERSION_3_1
  108. +28 −0 auto/core/GL_VERSION_3_2
  109. +11 −0 auto/core/GL_VERSION_3_3
  110. +25 −0 auto/core/GL_VERSION_4_0
  111. +4 −0 auto/core/GL_WIN_swap_hint
  112. +4 −0 auto/core/WGL_ATI_render_texture_rectangle
  113. +4 −0 auto/core/WGL_EXT_framebuffer_sRGB
  114. +4 −0 auto/core/WGL_EXT_pixel_format_packed_float
  115. +12 −0 auto/core/WGL_NV_gpu_affinity
  116. +5 −0 auto/core/WGL_NV_vertex_array_range
  117. +7 −0 auto/custom.txt
  118. +176 −0 auto/doc/advanced.html
  119. +180 −0 auto/doc/basic.html
  120. +25 −0 auto/doc/credits.html
  121. +100 −0 auto/doc/index.html
  122. +126 −0 auto/doc/install.html
  123. +602 −0 auto/doc/log.html
  124. 0 auto/extensions/.dummy
  125. +5 −0 auto/extensions/GLX_3DFX_multisample
  126. +9 −0 auto/extensions/GLX_ARB_create_context
  127. +6 −0 auto/extensions/GLX_ARB_create_context_profile
  128. +5 −0 auto/extensions/GLX_ARB_fbconfig_float
  129. +4 −0 auto/extensions/GLX_ARB_framebuffer_sRGB
  130. +4 −0 auto/extensions/GLX_ARB_get_proc_address
  131. +5 −0 auto/extensions/GLX_ARB_multisample
  132. +4 −0 auto/extensions/GLX_ARB_vertex_buffer_object
  133. +4 −0 auto/extensions/GLX_ATI_pixel_format_float
  134. +41 −0 auto/extensions/GLX_ATI_render_texture
  135. +5 −0 auto/extensions/GLX_EXT_fbconfig_packed_float
  136. +4 −0 auto/extensions/GLX_EXT_framebuffer_sRGB
  137. +11 −0 auto/extensions/GLX_EXT_import_context
  138. +3 −0 auto/extensions/GLX_EXT_scene_marker
  139. +6 −0 auto/extensions/GLX_EXT_swap_control
  140. +36 −0 auto/extensions/GLX_EXT_texture_from_pixmap
  141. +19 −0 auto/extensions/GLX_EXT_visual_info
  142. +6 −0 auto/extensions/GLX_EXT_visual_rating
  143. +7 −0 auto/extensions/GLX_INTEL_swap_event
  144. +4 −0 auto/extensions/GLX_MESA_agp_offset
  145. +4 −0 auto/extensions/GLX_MESA_copy_sub_buffer
  146. +4 −0 auto/extensions/GLX_MESA_pixmap_colormap
  147. +4 −0 auto/extensions/GLX_MESA_release_buffers
  148. +6 −0 auto/extensions/GLX_MESA_set_3dfx_mode
  149. +4 −0 auto/extensions/GLX_NV_copy_image
  150. +4 −0 auto/extensions/GLX_NV_float_buffer
  151. +6 −0 auto/extensions/GLX_NV_present_video
  152. +9 −0 auto/extensions/GLX_NV_swap_group
  153. +5 −0 auto/extensions/GLX_NV_vertex_array_range
  154. +19 −0 auto/extensions/GLX_NV_video_output
  155. +7 −0 auto/extensions/GLX_OML_swap_method
  156. +8 −0 auto/extensions/GLX_OML_sync_control
  157. +4 −0 auto/extensions/GLX_SGIS_blended_overlay
  158. +12 −0 auto/extensions/GLX_SGIS_color_range
  159. +5 −0 auto/extensions/GLX_SGIS_multisample
  160. +5 −0 auto/extensions/GLX_SGIS_shared_multisample
  161. +22 −0 auto/extensions/GLX_SGIX_fbconfig
  162. +25 −0 auto/extensions/GLX_SGIX_hyperpipe
  163. +35 −0 auto/extensions/GLX_SGIX_pbuffer
  164. +5 −0 auto/extensions/GLX_SGIX_swap_barrier
  165. +4 −0 auto/extensions/GLX_SGIX_swap_group
  166. +10 −0 auto/extensions/GLX_SGIX_video_resize
  167. +4 −0 auto/extensions/GLX_SGIX_visual_select_group
  168. +4 −0 auto/extensions/GLX_SGI_cushion
  169. +5 −0 auto/extensions/GLX_SGI_make_current_read
  170. +4 −0 auto/extensions/GLX_SGI_swap_control
  171. +5 −0 auto/extensions/GLX_SGI_video_sync
  172. +4 −0 auto/extensions/GLX_SUN_get_transparent_index
  173. +7 −0 auto/extensions/GLX_SUN_video_resize
  174. +7 −0 auto/extensions/GL_3DFX_multisample
  175. +4 −0 auto/extensions/GL_3DFX_tbuffer
  176. +5 −0 auto/extensions/GL_3DFX_texture_compression_FXT1
  177. +3 −0 auto/extensions/GL_AMD_conservative_depth
  178. +7 −0 auto/extensions/GL_AMD_draw_buffers_blend
  179. +23 −0 auto/extensions/GL_AMD_performance_monitor
  180. +4 −0 auto/extensions/GL_AMD_seamless_cubemap_per_texture
  181. +3 −0 auto/extensions/GL_AMD_shader_stencil_export
  182. +3 −0 auto/extensions/GL_AMD_texture_texture4
  183. +12 −0 auto/extensions/GL_AMD_vertex_shader_tessellator
  184. +4 −0 auto/extensions/GL_APPLE_aux_depth_stencil
  185. +4 −0 auto/extensions/GL_APPLE_client_storage
  186. +11 −0 auto/extensions/GL_APPLE_element_array
  187. +13 −0 auto/extensions/GL_APPLE_fence
  188. +17 −0 auto/extensions/GL_APPLE_float_pixels
  189. +7 −0 auto/extensions/GL_APPLE_flush_buffer_range
  190. +12 −0 auto/extensions/GL_APPLE_object_purgeable
  191. +4 −0 auto/extensions/GL_APPLE_pixel_buffer
  192. +6 −0 auto/extensions/GL_APPLE_rgb_422
  193. +5 −0 auto/extensions/GL_APPLE_row_bytes
  194. +4 −0 auto/extensions/GL_APPLE_specular_vector
  195. +12 −0 auto/extensions/GL_APPLE_texture_range
  196. +4 −0 auto/extensions/GL_APPLE_transform_hint
  197. +8 −0 auto/extensions/GL_APPLE_vertex_array_object
  198. +14 −0 auto/extensions/GL_APPLE_vertex_array_range
  199. +20 −0 auto/extensions/GL_APPLE_vertex_program_evaluators
  200. +6 −0 auto/extensions/GL_APPLE_ycbcr_422
  201. +9 −0 auto/extensions/GL_ARB_blend_func_extended
  202. +9 −0 auto/extensions/GL_ARB_color_buffer_float
  203. +3 −0 auto/extensions/GL_ARB_compatibility
  204. +6 −0 auto/extensions/GL_ARB_copy_buffer
  205. +6 −0 auto/extensions/GL_ARB_depth_buffer_float
  206. +4 −0 auto/extensions/GL_ARB_depth_clamp
  207. +8 −0 auto/extensions/GL_ARB_depth_texture
  208. +21 −0 auto/extensions/GL_ARB_draw_buffers
  209. +7 −0 auto/extensions/GL_ARB_draw_buffers_blend
  210. +7 −0 auto/extensions/GL_ARB_draw_elements_base_vertex
  211. +7 −0 auto/extensions/GL_ARB_draw_indirect
  212. +5 −0 auto/extensions/GL_ARB_draw_instanced
  213. +3 −0 auto/extensions/GL_ARB_explicit_attrib_location
  214. +3 −0 auto/extensions/GL_ARB_fragment_coord_conventions
  215. +18 −0 auto/extensions/GL_ARB_fragment_program
  216. +3 −0 auto/extensions/GL_ARB_fragment_program_shadow
  217. +6 −0 auto/extensions/GL_ARB_fragment_shader
  218. +97 −0 auto/extensions/GL_ARB_framebuffer_object
  219. +4 −0 auto/extensions/GL_ARB_framebuffer_sRGB
  220. +26 −0 auto/extensions/GL_ARB_geometry_shader4
  221. +9 −0 auto/extensions/GL_ARB_gpu_shader5
  222. +3 −0 auto/extensions/GL_ARB_gpu_shader_fp64
  223. +4 −0 auto/extensions/GL_ARB_half_float_pixel
  224. +4 −0 auto/extensions/GL_ARB_half_float_vertex
  225. +112 −0 auto/extensions/GL_ARB_imaging
  226. +5 −0 auto/extensions/GL_ARB_instanced_arrays
  227. +11 −0 auto/extensions/GL_ARB_map_buffer_range
  228. +18 −0 auto/extensions/GL_ARB_matrix_palette
  229. +13 −0 auto/extensions/GL_ARB_multisample
  230. +72 −0 auto/extensions/GL_ARB_multitexture
  231. +16 −0 auto/extensions/GL_ARB_occlusion_query
  232. +4 −0 auto/extensions/GL_ARB_occlusion_query2
  233. +7 −0 auto/extensions/GL_ARB_pixel_buffer_object
  234. +9 −0 auto/extensions/GL_ARB_point_parameters
  235. +5 −0 auto/extensions/GL_ARB_point_sprite
  236. +8 −0 auto/extensions/GL_ARB_provoking_vertex
  237. +6 −0 auto/extensions/GL_ARB_sample_shading
  238. +18 −0 auto/extensions/GL_ARB_sampler_objects
  239. +4 −0 auto/extensions/GL_ARB_seamless_cube_map
  240. +3 −0 auto/extensions/GL_ARB_shader_bit_encoding
  241. +78 −0 auto/extensions/GL_ARB_shader_objects
  242. +20 −0 auto/extensions/GL_ARB_shader_subroutine
  243. +3 −0 auto/extensions/GL_ARB_shader_texture_lod
  244. +4 −0 auto/extensions/GL_ARB_shading_language_100
  245. +12 −0 auto/extensions/GL_ARB_shading_language_include
  246. +6 −0 auto/extensions/GL_ARB_shadow
  247. +4 −0 auto/extensions/GL_ARB_shadow_ambient
  248. +25 −0 auto/extensions/GL_ARB_sync
  249. +37 −0 auto/extensions/GL_ARB_tessellation_shader
  250. +4 −0 auto/extensions/GL_ARB_texture_border_clamp
  251. +9 −0 auto/extensions/GL_ARB_texture_buffer_object
  252. +3 −0 auto/extensions/GL_ARB_texture_buffer_object_rgb32
  253. +21 −0 auto/extensions/GL_ARB_texture_compression
  254. +7 −0 auto/extensions/GL_ARB_texture_compression_bptc
  255. +7 −0 auto/extensions/GL_ARB_texture_compression_rgtc
  256. +15 −0 auto/extensions/GL_ARB_texture_cube_map
  257. +10 −0 auto/extensions/GL_ARB_texture_cube_map_array
  258. +3 −0 auto/extensions/GL_ARB_texture_env_add
  259. +25 −0 auto/extensions/GL_ARB_texture_env_combine
  260. +3 −0 auto/extensions/GL_ARB_texture_env_crossbar
  261. +5 −0 auto/extensions/GL_ARB_texture_env_dot3
  262. +23 −0 auto/extensions/GL_ARB_texture_float
  263. +6 −0 auto/extensions/GL_ARB_texture_gather
  264. +4 −0 auto/extensions/GL_ARB_texture_mirrored_repeat
  265. +28 −0 auto/extensions/GL_ARB_texture_multisample
  266. +3 −0 auto/extensions/GL_ARB_texture_non_power_of_two
  267. +3 −0 auto/extensions/GL_ARB_texture_query_lod
  268. +9 −0 auto/extensions/GL_ARB_texture_rectangle
  269. +28 −0 auto/extensions/GL_ARB_texture_rg
  270. +4 −0 auto/extensions/GL_ARB_texture_rgb10_a2ui
  271. +8 −0 auto/extensions/GL_ARB_texture_swizzle
  272. +8 −0 auto/extensions/GL_ARB_timer_query
  273. +14 −0 auto/extensions/GL_ARB_transform_feedback2
  274. +9 −0 auto/extensions/GL_ARB_transform_feedback3
  275. +11 −0 auto/extensions/GL_ARB_transpose_matrix
  276. +46 −0 auto/extensions/GL_ARB_uniform_buffer_object
  277. +4 −0 auto/extensions/GL_ARB_vertex_array_bgra
  278. +8 −0 auto/extensions/GL_ARB_vertex_array_object
  279. +55 −0 auto/extensions/GL_ARB_vertex_blend
  280. +47 −0 auto/extensions/GL_ARB_vertex_buffer_object
  281. +144 −0 auto/extensions/GL_ARB_vertex_program
  282. +13 −0 auto/extensions/GL_ARB_vertex_shader
  283. +43 −0 auto/extensions/GL_ARB_vertex_type_2_10_10_10_rev
  284. +19 −0 auto/extensions/GL_ARB_window_pos
  285. +9 −0 auto/extensions/GL_ATIX_point_sprites
  286. +6 −0 auto/extensions/GL_ATIX_texture_env_combine3
  287. +6 −0 auto/extensions/GL_ATIX_texture_env_route
  288. +4 −0 auto/extensions/GL_ATIX_vertex_shader_output_point_size
  289. +21 −0 auto/extensions/GL_ATI_draw_buffers
  290. +9 −0 auto/extensions/GL_ATI_element_array
  291. +15 −0 auto/extensions/GL_ATI_envmap_bumpmap
  292. +71 −0 auto/extensions/GL_ATI_fragment_shader
  293. +5 −0 auto/extensions/GL_ATI_map_object_buffer
  294. +6 −0 auto/extensions/GL_ATI_meminfo
  295. +14 −0 auto/extensions/GL_ATI_pn_triangles
  296. +9 −0 auto/extensions/GL_ATI_separate_stencil
  297. +3 −0 auto/extensions/GL_ATI_shader_texture_lod
  298. +4 −0 auto/extensions/GL_ATI_text_fragment_shader
  299. +4 −0 auto/extensions/GL_ATI_texture_compression_3dc
  300. +6 −0 auto/extensions/GL_ATI_texture_env_combine3
Sorry, we could not display the entire diff because too many files (674) changed.
26 CMakeLists.txt
@@ -0,0 +1,26 @@
+# Copyright (C) 2007-2009 LuaDist.
+# Created by Peter Drahoš
+# Redistribution and use of this file is allowed according to the terms of the MIT license.
+# For details see the COPYRIGHT file distributed with LuaDist.
+# Please note that the package source code is licensed under its own license.
+
+PROJECT(glew C)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+INCLUDE(dist.cmake)
+
+FIND_PACKAGE(OpenGL REQUIRED)
+INCLUDE_DIRECTORIES(include ${OPENGL_INCLUDE_DIR})
+
+ADD_LIBRARY(glew SHARED src/glew.c)
+TARGET_LINK_LIBRARIES(glew ${OPENGL_LIBRARIES})
+
+ADD_EXECUTABLE(glewinfo src/glewinfo.c)
+TARGET_LINK_LIBRARIES(glewinfo glew)
+
+ADD_EXECUTABLE(visualinfo src/visualinfo.c)
+TARGET_LINK_LIBRARIES(visualinfo glew)
+
+INSTALL(TARGETS glewinfo visualinfo DESTINATION ${INSTALL_BIN})
+INSTALL(TARGETS glew DESTINATION ${INSTALL_LIB})
+INSTALL(DIRECTORY include/ DESTINATION ${INSTALL_INC})
+INSTALL(FILES LICENSE.txt README.txt DESTINATION ${INSTALL_DATA})
73 LICENSE.txt
@@ -0,0 +1,73 @@
+The OpenGL Extension Wrangler Library
+Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
+Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
+Copyright (C) 2002, Lev Povalahev
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* The name of the author may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Mesa 3-D graphics library
+Version: 7.0
+
+Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+Copyright (c) 2007 The Khronos Group Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and/or associated documentation files (the
+"Materials"), to deal in the Materials without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Materials, and to
+permit persons to whom the Materials are furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Materials.
+
+THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
268 Makefile
@@ -0,0 +1,268 @@
+#!gmake
+## The OpenGL Extension Wrangler Library
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002, Lev Povalahev
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are met:
+##
+## * Redistributions of source code must retain the above copyright notice,
+## this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright notice,
+## this list of conditions and the following disclaimer in the documentation
+## and/or other materials provided with the distribution.
+## * The name of the author may be used to endorse or promote products
+## derived from this software without specific prior written permission.
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+## THE POSSIBILITY OF SUCH DAMAGE.
+
+include config/version
+
+SHELL = /bin/sh
+SYSTEM = $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
+SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
+
+ifeq ($(SYSTEM.SUPPORTED), 1)
+include config/Makefile.$(SYSTEM)
+else
+$(error "Platform '$(SYSTEM)' not supported")
+endif
+
+GLEW_DEST ?= /usr
+BINDIR ?= $(GLEW_DEST)/bin
+LIBDIR ?= $(GLEW_DEST)/lib
+INCDIR ?= $(GLEW_DEST)/include/GL
+SHARED_OBJ_EXT ?= o
+TARDIR = ../glew-$(GLEW_VERSION)
+TARBALL = ../glew-$(GLEW_VERSION).tar.gz
+
+DIST_DIR = glew-$(GLEW_VERSION)
+DIST_WIN32 = glew-$(GLEW_VERSION)-win32.zip
+DIST_SRC_ZIP = glew-$(GLEW_VERSION).zip
+DIST_SRC_TGZ = glew-$(GLEW_VERSION).tgz
+
+AR = ar
+INSTALL = install
+STRIP = strip
+RM = rm -f
+LN = ln -sf
+ifeq ($(MAKECMDGOALS), debug)
+OPT = -g
+else
+OPT = $(POPT)
+endif
+INCLUDE = -Iinclude
+CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA)
+
+LIB.SRCS = src/glew.c
+LIB.OBJS = $(LIB.SRCS:.c=.o)
+LIB.SOBJS = $(LIB.SRCS:.c=.$(SHARED_OBJ_EXT))
+LIB.LDFLAGS = $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
+LIB.LIBS = $(GL_LDFLAGS)
+
+GLEWINFO.BIN = glewinfo$(BIN.SUFFIX)
+GLEWINFO.BIN.SRCS = src/glewinfo.c
+GLEWINFO.BIN.OBJS = $(GLEWINFO.BIN.SRCS:.c=.o)
+VISUALINFO.BIN = visualinfo$(BIN.SUFFIX)
+VISUALINFO.BIN.SRCS = src/visualinfo.c
+VISUALINFO.BIN.OBJS = $(VISUALINFO.BIN.SRCS:.c=.o)
+BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
+
+all debug: lib/$(LIB.SHARED) lib/$(LIB.STATIC) bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) glew.pc
+
+lib:
+ mkdir lib
+
+lib/$(LIB.STATIC): $(LIB.OBJS)
+ $(AR) cr $@ $^
+
+lib/$(LIB.SHARED): $(LIB.SOBJS)
+ $(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
+ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw)
+else
+ $(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
+ $(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
+endif
+
+bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJS) lib/$(LIB.SHARED)
+ $(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJS) $(BIN.LIBS)
+
+bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJS) lib/$(LIB.SHARED)
+ $(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.OBJS) $(BIN.LIBS)
+
+%.o: %.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+src/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+ $(CC) $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
+
+src/glew.pic_o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+ $(CC) $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) -o $@ -c $<
+
+glew.pc: glew.pc.in
+ sed \
+ -e "s|@prefix@|$(GLEW_DEST)|g" \
+ -e "s|@libdir@|$(LIBDIR)|g" \
+ -e "s|@exec_prefix@|$(BINDIR)|g" \
+ -e "s|@includedir@|$(INCDIR)|g" \
+ -e "s|@version@|$(GLEW_VERSION)|g" \
+ < $< > $@
+
+install: all
+# directories
+ $(INSTALL) -d -m 0755 $(BINDIR)
+ $(INSTALL) -d -m 0755 $(INCDIR)
+ $(INSTALL) -d -m 0755 $(LIBDIR)
+# runtime
+ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw)
+ $(STRIP) -x lib/$(LIB.SHARED)
+ $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(BINDIR)/
+else
+ $(STRIP) -x lib/$(LIB.SHARED)
+ $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
+ $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
+endif
+# development files
+ $(INSTALL) -m 0644 include/GL/wglew.h $(INCDIR)/
+ $(INSTALL) -m 0644 include/GL/glew.h $(INCDIR)/
+ $(INSTALL) -m 0644 include/GL/glxew.h $(INCDIR)/
+ $(INSTALL) -m 0644 glew.pc $(LIBDIR)/pkgconfig/
+ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw)
+ $(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
+else
+ $(STRIP) -x lib/$(LIB.STATIC)
+ $(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
+ $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
+endif
+# utilities
+ $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/
+
+uninstall:
+ $(RM) $(INCDIR)/wglew.h
+ $(RM) $(INCDIR)/glew.h
+ $(RM) $(INCDIR)/glxew.h
+ $(RM) $(LIBDIR)/$(LIB.DEVLNK)
+ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw)
+ $(RM) $(BINDIR)/$(LIB.SHARED)
+else
+ $(RM) $(LIBDIR)/$(LIB.SONAME)
+ $(RM) $(LIBDIR)/$(LIB.SHARED)
+ $(RM) $(LIBDIR)/$(LIB.STATIC)
+endif
+ $(RM) $(BINDIR)/$(GLEWINFO.BIN) $(BINDIR)/$(VISUALINFO.BIN)
+
+clean:
+ $(RM) $(LIB.OBJS)
+ $(RM) $(LIB.SOBJS)
+ $(RM) lib/$(LIB.STATIC) lib/$(LIB.SHARED) lib/$(LIB.DEVLNK) lib/$(LIB.SONAME) $(LIB.STATIC)
+ $(RM) $(GLEWINFO.BIN.OBJS) bin/$(GLEWINFO.BIN) $(VISUALINFO.BIN.OBJS) bin/$(VISUALINFO.BIN)
+ $(RM) glew.pc
+# Compiler droppings
+ $(RM) so_locations
+
+distclean: clean
+ find . -name \*~ | xargs $(RM)
+ find . -name .\*.sw\? | xargs $(RM)
+
+tardist:
+ $(RM) -r $(TARDIR)
+ mkdir $(TARDIR)
+ cp -a . $(TARDIR)
+ find $(TARDIR) -name CVS -o -name .cvsignore | xargs $(RM) -r
+ find $(TARDIR) -name .svn | xargs $(RM) -r
+ $(MAKE) -C $(TARDIR) distclean
+ $(MAKE) -C $(TARDIR)
+ $(MAKE) -C $(TARDIR) distclean
+ $(RM) -r $(TARDIR)/auto/registry
+ env GZIP=-9 tar -C `dirname $(TARDIR)` -cvzf $(TARBALL) `basename $(TARDIR)`
+
+dist-win32:
+ $(RM) -r $(TARDIR)
+ mkdir -p $(TARDIR)
+ mkdir -p $(TARDIR)/bin
+ mkdir -p $(TARDIR)/lib
+ cp -a include $(TARDIR)
+ cp -a doc $(TARDIR)
+ cp -a *.txt $(TARDIR)
+ cp -a lib/glew32.lib $(TARDIR)/lib
+ cp -a lib/glew32s.lib $(TARDIR)/lib
+ cp -a bin/glew32.dll $(TARDIR)/bin
+ cp -a bin/glewinfo.exe $(TARDIR)/bin
+ cp -a bin/visualinfo.exe $(TARDIR)/bin
+ find $(TARDIR) -name CVS -o -name .cvsignore | xargs $(RM) -r
+ find $(TARDIR) -name .svn | xargs $(RM) -r
+ unix2dos $(TARDIR)/include/GL/*.h
+ unix2dos $(TARDIR)/doc/*.txt
+ unix2dos $(TARDIR)/doc/*.html
+ unix2dos $(TARDIR)/*.txt
+ rm -f ../$(DIST_WIN32)
+ cd .. && zip -rv9 $(DIST_WIN32) $(DIST_DIR)
+
+dist-src:
+ $(RM) -r $(TARDIR)
+ mkdir -p $(TARDIR)
+ mkdir -p $(TARDIR)/bin
+ mkdir -p $(TARDIR)/lib
+ cp -a auto $(TARDIR)
+ $(RM) -Rf $(TARDIR)/auto/registry
+ cp -a build $(TARDIR)
+ cp -a config $(TARDIR)
+ cp -a src $(TARDIR)
+ cp -a doc $(TARDIR)
+ cp -a include $(TARDIR)
+ cp -a *.txt $(TARDIR)
+ cp -a Makefile $(TARDIR)
+ cp -a glew.pc.in $(TARDIR)
+ find $(TARDIR) -name '*.o' | xargs $(RM) -r
+ find $(TARDIR) -name '*.pic_o' | xargs $(RM) -r
+ find $(TARDIR) -name '*~' | xargs $(RM) -r
+ find $(TARDIR) -name CVS -o -name .cvsignore | xargs $(RM) -r
+ find $(TARDIR) -name .svn | xargs $(RM) -r
+ unix2dos $(TARDIR)/config/*
+ unix2dos $(TARDIR)/auto/core/*
+ unix2dos $(TARDIR)/auto/extensions/*
+ find $(TARDIR) -name '*.h' | xargs unix2dos
+ find $(TARDIR) -name '*.c' | xargs unix2dos
+ find $(TARDIR) -name '*.txt' | xargs unix2dos
+ find $(TARDIR) -name '*.html' | xargs unix2dos
+ find $(TARDIR) -name '*.css' | xargs unix2dos
+ find $(TARDIR) -name '*.sh' | xargs unix2dos
+ find $(TARDIR) -name '*.pl' | xargs unix2dos
+ find $(TARDIR) -name 'Makefile' | xargs unix2dos
+ find $(TARDIR) -name '*.in' | xargs unix2dos
+ find $(TARDIR) -name '*.pm' | xargs unix2dos
+ find $(TARDIR) -name '*.rc' | xargs unix2dos
+ rm -f ../$(DIST_SRC_ZIP)
+ cd .. && zip -rv9 $(DIST_SRC_ZIP) $(DIST_DIR)
+ dos2unix $(TARDIR)/config/*
+ dos2unix $(TARDIR)/auto/core/*
+ dos2unix $(TARDIR)/auto/extensions/*
+ find $(TARDIR) -name '*.h' | xargs dos2unix
+ find $(TARDIR) -name '*.c' | xargs dos2unix
+ find $(TARDIR) -name '*.txt' | xargs dos2unix
+ find $(TARDIR) -name '*.html' | xargs dos2unix
+ find $(TARDIR) -name '*.css' | xargs dos2unix
+ find $(TARDIR) -name '*.sh' | xargs dos2unix
+ find $(TARDIR) -name '*.pl' | xargs dos2unix
+ find $(TARDIR) -name 'Makefile' | xargs dos2unix
+ find $(TARDIR) -name '*.in' | xargs dos2unix
+ find $(TARDIR) -name '*.pm' | xargs dos2unix
+ find $(TARDIR) -name '*.rc' | xargs dos2unix
+ cd .. && env GZIP=-9 tar cvzf $(DIST_SRC_TGZ) $(DIST_DIR)
+
+extensions:
+ $(MAKE) -C auto
+
+.PHONY: clean distclean tardist dist-win32 dist-src
18 README.txt
@@ -0,0 +1,18 @@
+See doc/index.html for more information.
+
+If you downloaded the tarball from the GLEW website, you just need to:
+
+ Unix:
+
+ make
+
+ Windows:
+
+ use the project file in build/vc6/
+
+If you wish to build GLEW from scratch (update the extension data from
+the net or add your own extension information), you need a Unix
+environment (including wget, perl, and GNU make). The extension data
+is regenerated from the top level source directory with:
+
+ make extensions
12 TODO.txt
@@ -0,0 +1,12 @@
+Major:
+ - add support for windows mini-client drivers
+ - add windows installer (msi)
+ - separate build of static and shared object files (for mingw and
+ cygwin)
+ - start designing GLEW 2.0
+
+Minor:
+ - make auto scripts work with text mode cygwin mounts
+ - add support for all SUN, MTX, and OML extensions
+ - make auto/Makefile more robust against auto/core/*~ mistakes
+ - web poll on separating glew, glxew and wglew
371 auto/Makefile
@@ -0,0 +1,371 @@
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+include ../config/version
+
+#GLEW_SPLIT_SOURCE = yes
+
+SHELL = bash
+REGISTRY = registry
+REGISTRY_URL = http://www.opengl.org/registry/
+#http://oss.sgi.com/projects/ogl-sample/registry/
+BIN = bin
+SRC = src
+CORE = core
+EXT = extensions
+BLACKLIST = blacklist
+
+GL_CORE_SPEC := $(CORE)/GL_VERSION*
+GLX_CORE_SPEC := $(CORE)/GLX_VERSION*
+ifeq (custom,$(MAKECMDGOALS))
+#GL_CORE_SPEC := $(shell grep GL_VERSION custom.txt | sed -e 's/\(.*\)/$(CORE)\/\1/g;')
+GL_EXT_SPEC := $(shell grep "^[ \t]*GL_" custom.txt | grep -v GL_VERSION | sed -e 's/\(.*\)/$(EXT)\/\1/g;')
+WGL_EXT_SPEC := $(shell grep "^[ \t]*WGL_" custom.txt | sed -e 's/\(.*\)/$(EXT)\/\1/g;')
+#GLX_CORE_SPEC := $(shell grep GLX_VERSION custom.txt | sed -e 's/\(.*\)/$(CORE)\/\1/g;')
+GLX_EXT_SPEC := $(shell grep "^[ \t]*GLX_" custom.txt | grep -v GLX_VERSION | grep -v GLX_OML_sync_control | sed -e 's/\(.*\)/$(EXT)\/\1/g;')
+else
+GL_EXT_SPEC := $(EXT)/GL_*
+WGL_EXT_SPEC := $(EXT)/WGL_*
+GLX_EXT_SPEC := $(EXT)/GLX_*
+endif
+
+PARSE_SPEC = parse_spec.pl
+SYSTEM = $(strip $(shell uname -s))
+
+TOP = ..
+I.DEST = $(TOP)/include/GL
+S.DEST = $(TOP)/src
+D.DEST = $(TOP)/doc
+B.DEST = $(TOP)/build/vc6
+
+I.TARGETS = \
+ $(I.DEST)/glew.h \
+ $(I.DEST)/wglew.h \
+ $(I.DEST)/glxew.h
+
+ifeq (yes,$(GLEW_SPLIT_SOURCE))
+S.TARGETS = \
+ $(S.DEST)/glew_def.c \
+ $(S.DEST)/glew_init.c \
+ $(S.DEST)/glew_str.c \
+ $(S.DEST)/glewinfo.c
+else
+S.TARGETS = \
+ $(S.DEST)/glew.c \
+ $(S.DEST)/glewinfo.c
+endif
+
+D.TARGETS = \
+ $(D.DEST)/index.html \
+ $(D.DEST)/install.html \
+ $(D.DEST)/basic.html \
+ $(D.DEST)/advanced.html \
+ $(D.DEST)/credits.html \
+ $(D.DEST)/log.html \
+ $(D.DEST)/glew.html \
+ $(D.DEST)/wglew.html \
+ $(D.DEST)/glxew.html
+
+B.TARGETS = \
+ $(B.DEST)/glew.rc \
+ $(B.DEST)/glewinfo.rc \
+ $(B.DEST)/visualinfo.rc
+
+all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
+
+registry: $(REGISTRY)/.dummy
+ext: $(EXT)/.dummy
+
+$(REGISTRY)/.dummy: $(BIN)/update_registry.sh
+ @echo "--------------------------------------------------------------------"
+ @echo "Downloading registry"
+ @echo "--------------------------------------------------------------------"
+ $(BIN)/update_registry.sh $(REGISTRY) $(REGISTRY_URL)
+ touch $@
+
+$(EXT)/.dummy: $(REGISTRY)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating descriptors"
+ @echo "--------------------------------------------------------------------"
+ rm -rf $(EXT)
+ $(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST)
+ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
+ find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
+ xargs -J % cp % $(EXT)
+else
+ find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
+ xargs cp --target-directory=$(EXT)
+endif
+ touch $@
+
+$(I.DEST)/glew.h: $(EXT)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating glew.h"
+ @echo "--------------------------------------------------------------------"
+ test -d $(I.DEST) || mkdir -p $(I.DEST)
+ cp -f $(SRC)/glew_license.h $@
+ cat $(SRC)/mesa_license.h >> $@
+ cat $(SRC)/khronos_license.h >> $@
+ cat $(SRC)/glew_head.h >> $@
+ $(BIN)/make_header.pl GLAPIENTRY GL $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_header.pl GLAPIENTRY GL $(GL_EXT_SPEC) >> $@
+ echo -e "/* ------------------------------------------------------------------------- */\n\n#if defined(GLEW_MX) && defined(_WIN32)\n#define GLEW_FUN_EXPORT\n#else\n#define GLEW_FUN_EXPORT GLEWAPI\n#endif /* GLEW_MX */\n" >> $@
+ echo -e "#if defined(GLEW_MX)\n#define GLEW_VAR_EXPORT\n#else\n#define GLEW_VAR_EXPORT GLEWAPI\n#endif /* GLEW_MX */\n" >> $@
+ echo -e "#if defined(GLEW_MX) && defined(_WIN32)\nstruct GLEWContextStruct\n{\n#endif /* GLEW_MX */" >> $@
+ $(BIN)/make_struct_fun.pl GLEW_FUN_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
+ echo -e "\n#if defined(GLEW_MX) && !defined(_WIN32)\nstruct GLEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
+ $(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
+ echo -e "\n#ifdef GLEW_MX\n}; /* GLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
+ perl -e 's/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_1;\nGLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/' -pi $@
+ rm -f $@.bak
+ cat $(SRC)/glew_tail.h >> $@
+
+$(I.DEST)/wglew.h: $(EXT)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating wglew.h"
+ @echo "--------------------------------------------------------------------"
+ cp -f $(SRC)/glew_license.h $@
+ cat $(SRC)/khronos_license.h >> $@
+ cat $(SRC)/wglew_head.h >> $@
+ $(BIN)/make_header.pl WINAPI WGL $(WGL_EXT_SPEC) >> $@
+ echo -e "/* ------------------------------------------------------------------------- */\n\n#ifdef GLEW_MX\n#define WGLEW_EXPORT\n#else\n#define WGLEW_EXPORT GLEWAPI\n#endif /* GLEW_MX */\n\n#ifdef GLEW_MX\nstruct WGLEWContextStruct\n{\n#endif /* GLEW_MX */" >> $@
+ $(BIN)/make_struct_fun.pl WGLEW_EXPORT $(WGL_EXT_SPEC) >> $@
+ $(BIN)/make_struct_var.pl WGLEW_EXPORT $(WGL_EXT_SPEC) >> $@
+ echo -e "\n#ifdef GLEW_MX\n}; /* WGLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
+ cat $(SRC)/wglew_tail.h >> $@
+
+$(I.DEST)/glxew.h: $(EXT)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating glxew.h"
+ @echo "--------------------------------------------------------------------"
+ cp -f $(SRC)/glew_license.h $@
+ cat $(SRC)/mesa_license.h >> $@
+ cat $(SRC)/khronos_license.h >> $@
+ cat $(SRC)/glxew_head.h >> $@
+ $(BIN)/make_header.pl '' GLX $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_header.pl '' GLX $(GLX_EXT_SPEC) >> $@
+ echo -e "/* ------------------------------------------------------------------------- */\n\n#ifdef GLEW_MX\n#define GLXEW_EXPORT\n#else\n#define GLXEW_EXPORT extern\n#endif /* GLEW_MX */" >> $@
+ $(BIN)/make_struct_fun.pl extern $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
+ echo -e "\n#if defined(GLEW_MX)\nstruct GLXEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
+ $(BIN)/make_struct_var.pl GLXEW_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
+ echo -e "\n#ifdef GLEW_MX\n}; /* GLXEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
+ perl -e 's/GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/' -pi $@
+ cat $(SRC)/glxew_tail.h >> $@
+ $(BIN)/fix_OML_sync_control.sh $@
+
+$(S.DEST)/glew.c: $(EXT)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating glew.c"
+ @echo "--------------------------------------------------------------------"
+ cp -f $(SRC)/glew_license.h $@
+ cat $(SRC)/glew_head.c >> $@
+ echo -e "\n#if !defined(_WIN32) || !defined(GLEW_MX)" >> $@
+ $(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@
+ echo -e "\n#endif /* !WIN32 || !GLEW_MX */" >> $@
+ echo -e "\n#if !defined(GLEW_MX)" >> $@;
+ echo -e "\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@
+ $(BIN)/make_def_var.pl GL $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
+ echo -e "\n#endif /* !GLEW_MX */\n" >> $@;
+ $(BIN)/make_init.pl GL $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_init.pl GL $(GL_EXT_SPEC) >> $@
+ cat $(SRC)/glew_init_gl.c >> $@
+ $(BIN)/make_list.pl $(GL_CORE_SPEC) | grep -v '\"GL_VERSION' >> $@
+ $(BIN)/make_list.pl $(GL_EXT_SPEC) >> $@
+ echo -e "\n return GLEW_OK;\n}\n" >> $@
+ echo -e "\n#if defined(_WIN32)" >> $@
+ echo -e "\n#if !defined(GLEW_MX)" >> $@
+ $(BIN)/make_def_fun.pl WGL $(WGL_EXT_SPEC) >> $@
+ $(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
+ echo -e "\n#endif /* !GLEW_MX */\n" >> $@;
+ $(BIN)/make_init.pl WGL $(WGL_EXT_SPEC) >> $@
+ cat $(SRC)/glew_init_wgl.c >> $@
+ $(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
+ echo -e "\n return GLEW_OK;\n}" >> $@;
+ echo -e "\n#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)" >> $@
+ $(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
+ echo -e "\n#if !defined(GLEW_MX)" >> $@;
+ echo -e "\nGLboolean __GLXEW_VERSION_1_0 = GL_FALSE;" >> $@
+ echo -e "GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;" >> $@
+ $(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
+ echo -e "\n#endif /* !GLEW_MX */\n" >> $@;
+ $(BIN)/make_init.pl GLX $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_init.pl GLX $(GLX_EXT_SPEC) >> $@
+ cat $(SRC)/glew_init_glx.c >> $@
+ $(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
+ $(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
+ echo -e "\n return GLEW_OK;\n}" >> $@
+ echo -e "\n#endif /* !__APPLE__ || GLEW_APPLE_GLX */\n" >> $@;
+ cat $(SRC)/glew_init_tail.c >> $@
+ cat $(SRC)/glew_str_head.c >> $@
+ $(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
+ cat $(SRC)/glew_str_wgl.c >> $@
+ $(BIN)/make_str.pl $(WGL_EXT_SPEC) >> $@
+ cat $(SRC)/glew_str_glx.c >> $@
+ $(BIN)/make_str.pl $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
+ cat $(SRC)/glew_str_tail.c >> $@
+ perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
+ perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@
+ perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@
+ perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@
+ perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
+ perl -e "s/\(\(glColorSubTable = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glColorSubTable = /g" -pi $@
+ $(BIN)/fix_OML_sync_control.sh $@
+ rm -f $@.bak
+
+$(S.DEST)/glew_def.c: $(EXT)/.dummy
+ cp -f $(SRC)/glew_license.h $@
+ echo -e "#include \"glew_utils.h\"\n\n#if !defined(_WIN32) || !defined(GLEW_MX)" >> $@
+ $(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@
+ echo -e "\n#endif /* !WIN32 || !GLEW_MX */" >> $@
+ echo -e "\n#if !defined(GLEW_MX)\n\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@
+ $(BIN)/make_def_var.pl GL $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
+ echo -e "\n#if defined(_WIN32)" >> $@
+ $(BIN)/make_def_fun.pl WGL $(WGL_EXT_SPEC) >> $@
+ $(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
+ echo -e "\n#endif /* _WIN32 */" >> $@
+ echo -e "\n#endif /* !GLEW_MX */" >> $@;
+ echo -e "\n#if !defined(_WIN32) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
+ $(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
+ echo -e "\n#if !defined(GLEW_MX)" >> $@;
+ echo -e "\nGLboolean __GLXEW_VERSION_1_0 = GL_FALSE;" >> $@
+ echo -e "GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;" >> $@
+ $(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
+ echo -e "\n#endif /* !GLEW_MX */" >> $@;
+ echo -e "\n#endif /* !__APPLE__ || GLEW_APPLE_GLX */" >> $@;
+ rm -f $@.bak
+
+$(S.DEST)/glew_init.c: $(EXT)/.dummy
+ cp -f $(SRC)/glew_license.h $@
+ echo -e "#include \"glew_utils.h\"\n" >> $@
+ $(BIN)/make_init.pl GL $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_init.pl GL $(GL_EXT_SPEC) >> $@
+ cat $(SRC)/glew_init_gl.c >> $@
+ $(BIN)/make_list.pl $(GL_CORE_SPEC) | grep -v '\"GL_VERSION' >> $@
+ $(BIN)/make_list.pl $(GL_EXT_SPEC) >> $@
+ echo -e "\n return GLEW_OK;\n}\n\n#if defined(_WIN32)\n" >> $@;
+ $(BIN)/make_init.pl WGL $(WGL_EXT_SPEC) >> $@
+ cat $(SRC)/glew_init_wgl.c >> $@
+ $(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
+ echo -e "\n return GLEW_OK;\n}\n\n" >> $@;
+ echo -e "\n#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)\n" >> $@
+ $(BIN)/make_init.pl GLX $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_init.pl GLX $(GLX_EXT_SPEC) >> $@
+ cat $(SRC)/glew_init_glx.c >> $@
+ $(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
+ $(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
+ echo -e "\n return GLEW_OK;\n}\n\n#endif /* !__APPLE__ || GLEW_APPLE_GLX */\n" >> $@;
+ cat $(SRC)/glew_init_tail.c >> $@
+ perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
+ perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@
+ perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@
+ perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@
+ perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
+ perl -e "s/\(\(glBlendColor = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glBlendColor = /g" -pi $@
+ $(BIN)/fix_OML_sync_control.sh $@
+ rm -f $@.bak
+
+$(S.DEST)/glew_str.c: $(EXT)/.dummy
+ cp -f $(SRC)/glew_license.h $@
+ echo -e "\n#include \"glew_utils.h\"\n" >> $@
+ cat $(SRC)/glew_str_head.c >> $@
+ $(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
+ cat $(SRC)/glew_str_wgl.c >> $@
+ $(BIN)/make_str.pl $(WGL_EXT_SPEC) >> $@
+ cat $(SRC)/glew_str_glx.c >> $@
+ $(BIN)/make_str.pl $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
+ cat $(SRC)/glew_str_tail.c >> $@
+# $(BIN)/fix_OML_sync_control.sh $@
+# perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
+# perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
+ rm -f $@.bak
+
+$(S.DEST)/glewinfo.c: $(EXT)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating glewinfo.c"
+ @echo "--------------------------------------------------------------------"
+ cp -f $(SRC)/glew_license.h $@
+ cat $(SRC)/glewinfo_head.c >> $@
+ $(BIN)/make_info.pl $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_info.pl $(GL_EXT_SPEC) >> $@
+ echo -e "#ifdef _WIN32\n" >> $@
+ $(BIN)/make_info.pl $(WGL_EXT_SPEC) >> $@
+ echo -e "#else /* _UNIX */\n" >> $@
+ $(BIN)/make_info.pl $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_info.pl $(GLX_EXT_SPEC) >> $@
+ echo -e "#endif /* _WIN32 */\n" >> $@
+
+ cat $(SRC)/glewinfo_gl.c >> $@
+ $(BIN)/make_info_list.pl $(GL_CORE_SPEC) >> $@
+ $(BIN)/make_info_list.pl $(GL_EXT_SPEC) >> $@
+ cat $(SRC)/glewinfo_wgl.c >> $@
+ $(BIN)/make_info_list.pl $(WGL_EXT_SPEC) >> $@
+ cat $(SRC)/glewinfo_glx.c >> $@
+ $(BIN)/make_info_list.pl $(GLX_CORE_SPEC) >> $@
+ $(BIN)/make_info_list.pl $(GLX_EXT_SPEC) >> $@
+ cat $(SRC)/glewinfo_tail.c >> $@
+ $(BIN)/fix_OML_sync_control.sh $@
+ perl -e 's/"glColorSubTable"/"glBlendEquation", glBlendEquation == NULL);\n glewInfoFunc("glColorSubTable"/g' -pi $@
+ rm -f $@.bak
+
+# Update documentation
+
+$(D.DEST)/%.html: doc/%.html
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating $(@F)"
+ @echo "--------------------------------------------------------------------"
+ cat $(SRC)/header.html $< $(SRC)/footer.html | \
+ sed 's#<a href="$(@F)">\(.*\)</a>#\1#' > $@
+
+$(D.DEST)/glew.html: $(EXT)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating glew.html"
+ @echo "--------------------------------------------------------------------"
+ cp -f $(SRC)/header.html $@
+ echo -e "<h2>Supported OpenGL Extensions</h2>\n" >> $@
+ $(BIN)/make_html.pl $(GL_EXT_SPEC) >> $@
+ cat $(SRC)/footer.html >> $@
+ sed -i 's#<a href="$(@F)">\(.*\)</a>#\1#' $@
+
+$(D.DEST)/wglew.html: $(EXT)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating wglew.html"
+ @echo "--------------------------------------------------------------------"
+ cp -f $(SRC)/header.html $@
+ echo -e "<h2>Supported WGL Extensions</h2>\n" >> $@
+ $(BIN)/make_html.pl $(WGL_EXT_SPEC) >> $@
+ cat $(SRC)/footer.html >> $@
+ sed -i 's#<a href="$(@F)">\(.*\)</a>#\1#' $@
+
+$(D.DEST)/glxew.html: $(EXT)/.dummy
+ @echo "--------------------------------------------------------------------"
+ @echo "Creating glxew.html"
+ @echo "--------------------------------------------------------------------"
+ cp -f $(SRC)/header.html $@
+ echo -e "<h2>Supported GLX Extensions</h2>\n" >> $@
+ $(BIN)/make_html.pl $(GLX_EXT_SPEC) >> $@
+ cat $(SRC)/footer.html >> $@
+ sed -i 's#<a href="$(@F)">\(.*\)</a>#\1#' $@
+
+$(B.DEST)/%.rc: src/%.rc $(EXT)/.dummy
+ perl -e "s/GLEW_MAJOR/$(GLEW_MAJOR)/g;s/GLEW_MINOR/$(GLEW_MINOR)/g;s/GLEW_MICRO/$(GLEW_MICRO)/g;" -p $< > $@
+
+clean:
+ rm -rf $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
+
+clobber: clean
+ rm -rf $(EXT)
+
+destroy: clobber
+ rm -rf $(REGISTRY)
18 auto/bin/fix_OML_sync_control.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+perl -e 's/#ifndef GLX_OML_sync_control/#if !defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include <inttypes.h>/;' -pi $1
+perl -e 's/#ifdef GLX_OML_sync_control/#if defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include <inttypes.h>/;' -pi $1
+perl -e 's/(extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;)/#ifdef GLX_OML_sync_control\n\1/' -pi $1
+perl -e 's/(extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;)/\1\n#endif/' -pi $1
+perl -e 's/(extern GLboolean __GLXEW_OML_sync_control;)/#ifdef GLX_OML_sync_control\n\1\n#endif/' -pi $1
+perl -e 's/(PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML = NULL;)/#ifdef GLX_OML_sync_control\n\1/' -pi $1
+perl -e 's/(PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML = NULL;)/\1\n#endif/' -pi $1
+perl -e 's/(GLboolean __GLXEW_OML_sync_control = GL_FALSE;)/#ifdef GLX_OML_sync_control\n\1\n#endif/' -pi $1
+rm -f $1.bak
188 auto/bin/make.pl
@@ -0,0 +1,188 @@
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+my %regex = (
+ extname => qr/^[A-Z][A-Za-z0-9_]+$/,
+ exturl => qr/^http.+$/,
+ function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
+ token => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-Fa-f]+|[A-Z][A-Z0-9_]*)$/,
+ type => qr/^typedef\s+(.+)\s+([\*A-Za-z0-9_]+)$/,
+ exact => qr/.*;$/,
+);
+
+# prefix function name with glew
+sub prefixname($)
+{
+ my $name = $_[0];
+ $name =~ s/^(.*)gl/__$1glew/;
+ return $name;
+}
+
+# prefix function name with glew
+sub prefix_varname($)
+{
+ my $name = $_[0];
+ $name =~ s/^(.*)GL(X*)EW/__$1GL$2EW/;
+ return $name;
+}
+
+#---------------------------------------------------------------------------------------
+
+sub make_exact($)
+{
+ my $exact = $_[0];
+ $exact =~ s/(; |{)/$1\n/g;
+ return $exact;
+}
+
+sub make_separator($)
+{
+ my $extname = $_[0];
+ my $l = length $extname;
+ my $s = (71 - $l)/2;
+ print "/* ";
+ my $j = 3;
+ for (my $i = 0; $i < $s; $i++)
+ {
+ print "-";
+ $j++;
+ }
+ print " $_[0] ";
+ $j += $l + 2;
+ while ($j < 76)
+ {
+ print "-";
+ $j++;
+ }
+ print " */\n\n";
+}
+
+#---------------------------------------------------------------------------------------
+
+sub parse_ext($)
+{
+ my $filename = shift;
+ my %functions = ();
+ my %tokens = ();
+ my %types = ();
+ my @exacts = ();
+ my $extname = ""; # Full extension name GL_FOO_extension
+ my $exturl = ""; # Info URL
+ my $extstring = ""; # Relevant extension string
+
+ open EXT, "<$filename" or return;
+
+ # As of GLEW 1.5.3 the first three lines _must_ be
+ # the extension name, the URL and the GL extension
+ # string (which might be different to the name)
+ #
+ # For example GL_NV_geometry_program4 is available
+ # iff GL_NV_gpu_program4 appears in the extension
+ # string.
+ #
+ # For core OpenGL versions, the third line should
+ # be blank.
+ #
+ # If the URL is unknown, the second line should be
+ # blank.
+
+ $extname = readline(*EXT);
+ $exturl = readline(*EXT);
+ $extstring = readline(*EXT);
+
+ chomp($extname);
+ chomp($exturl);
+ chomp($extstring);
+
+ while(<EXT>)
+ {
+ chomp;
+ if (s/^\s+//)
+ {
+ if (/$regex{exact}/)
+ {
+ push @exacts, $_;
+ }
+ elsif (/$regex{type}/)
+ {
+ my ($value, $name) = ($1, $2);
+ $types{$name} = $value;
+ }
+ elsif (/$regex{token}/)
+ {
+ my ($name, $value) = ($1, $2);
+ $tokens{$name} = $value;
+ }
+ elsif (/$regex{function}/)
+ {
+ my ($return, $name, $parms) = ($1, $2, $3);
+ $functions{$name} = {
+ rtype => $return,
+ parms => $parms,
+ };
+ } else {
+ print STDERR "'$_' matched no regex.\n";
+ }
+ }
+ }
+
+ close EXT;
+
+ return ($extname, $exturl, $extstring, \%types, \%tokens, \%functions, \@exacts);
+}
+
+sub output_tokens($$)
+{
+ my ($tbl, $fnc) = @_;
+ if (keys %{$tbl})
+ {
+ local $, = "\n";
+ print "\n";
+ print map { &{$fnc}($_, $tbl->{$_}) } sort { hex ${$tbl}{$a} <=> hex ${$tbl}{$b} } keys %{$tbl};
+ print "\n";
+ } else {
+ print STDERR "no keys in table!\n";
+ }
+}
+
+sub output_types($$)
+{
+ my ($tbl, $fnc) = @_;
+ if (keys %{$tbl})
+ {
+ local $, = "\n";
+ print "\n";
+ print map { &{$fnc}($_, $tbl->{$_}) } sort { ${$tbl}{$a} cmp ${$tbl}{$b} } keys %{$tbl};
+ print "\n";
+ }
+}
+
+sub output_decls($$)
+{
+ my ($tbl, $fnc) = @_;
+ if (keys %{$tbl})
+ {
+ local $, = "\n";
+ print "\n";
+ print map { &{$fnc}($_, $tbl->{$_}) } sort keys %{$tbl};
+ print "\n";
+ }
+}
+
+sub output_exacts($$)
+{
+ my ($tbl, $fnc) = @_;
+ if (scalar @{$tbl})
+ {
+ local $, = "\n";
+ print "\n";
+ print map { &{$fnc}($_) } sort @{$tbl};
+ print "\n";
+ }
+}
+
35 auto/bin/make_def_fun.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+# function pointer declaration
+sub make_pfn_decl($%)
+{
+ return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
+}
+
+my @extlist = ();
+my %extensions = ();
+
+our $type = shift;
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+ output_decls($functions, \&make_pfn_decl);
+ }
+}
31 auto/bin/make_def_var.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+my @extlist = ();
+my %extensions = ();
+
+our $type = shift;
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+ my $extvar = $extname;
+ $extvar =~ s/GL(X*)_/GL$1EW_/;
+ print "GLboolean " . prefix_varname($extvar) . " = GL_FALSE;\n";
+ }
+}
71 auto/bin/make_header.pl
@@ -0,0 +1,71 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+# token
+sub make_define($$)
+{
+ return "#define $_[0] $_[1]"
+}
+
+# type declaration
+sub make_type($$)
+{
+ return "typedef $_[1] $_[0];"
+}
+
+# function pointer type declaration
+sub make_pfn_type($%)
+{
+ our $api;
+ return join(' ', "typedef", $_[1]->{rtype},
+ "($api * PFN" . (uc $_[0]) . "PROC)",
+ "(" . $_[1]->{parms} . ")") . ";";
+}
+
+# function name alias
+sub make_pfn_alias($%)
+{
+ our $type;
+ return join(" ", "#define", $_[0], $type . "EW_GET_FUN(" . prefixname($_[0]) . ")")
+}
+
+my @extlist = ();
+my %extensions = ();
+
+our $api = shift;
+our $type = shift;
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+
+ make_separator($extname);
+ print "#ifndef $extname\n#define $extname 1\n";
+ output_tokens($tokens, \&make_define);
+ output_types($types, \&make_type);
+ output_exacts($exacts, \&make_exact);
+ output_decls($functions, \&make_pfn_type);
+ output_decls($functions, \&make_pfn_alias);
+
+ my $extvar = $extname;
+ $extvar =~ s/GL(X*)_/GL$1EW_/;
+
+ print "\n#define $extvar " . $type . "EW_GET_VAR(" . prefix_varname($extvar) . ")\n";
+ print "\n#endif /* $extname */\n\n";
+ }
+}
55 auto/bin/make_html.pl
@@ -0,0 +1,55 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+#---------------------------------------------------------------------------------------
+
+my @extlist = ();
+my %extensions = ();
+my $group = "";
+my $cur_group = "";
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+ my $n = 1;
+ print "<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\">\n";
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+ $cur_group = $extname;
+ $cur_group =~ s/^(?:W?)GL(?:X?)_([A-Z0-9]+?)_.*$/$1/;
+ $extname =~ s/^(?:W?)GL(?:X?)_(.*)$/$1/;
+ if ($cur_group ne $group)
+ {
+ if ($group ne "")
+ {
+ print "<tr><td><br></td><td></td><td></td></tr>\n";
+ }
+ $group = $cur_group;
+ }
+
+ {
+ if ($exturl)
+ {
+ print "<tr><td class=\"num\">$n</td><td>&nbsp;</td><td><a href=\"$exturl\">$extname</a></td></tr>\n";
+ }
+ else
+ {
+ print "<tr><td class=\"num\">$n</td><td>&nbsp;</td><td>$extname</td></tr>\n";
+ }
+ $n++;
+ }
+ }
+ print "</table>\n"
+}
59 auto/bin/make_info.pl
@@ -0,0 +1,59 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+#---------------------------------------------------------------------------------------
+
+# function pointer definition
+sub make_pfn_info($%)
+{
+ my $name = $_[0];
+ return " glewInfoFunc(\"$_[0]\", $name == NULL);";
+}
+
+#---------------------------------------------------------------------------------------
+
+my @extlist = ();
+my %extensions = ();
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+ my $extvar = $extname;
+ $extvar =~ s/GL(X*)_/GL$1EW_/;
+ my $extpre = $extname;
+ $extpre =~ s/(GLX|GLW|GL).*/$1/;
+ $extpre = lc $extpre;
+
+ #make_separator($extname);
+ print "#ifdef $extname\n\n";
+ print "static void _glewInfo_$extname (void)\n{\n";
+ if ($extvar =~ /VERSION/)
+ {
+ print " glewPrintExt(\"$extname\", $extvar, $extvar, $extvar);\n";
+ }
+ else
+ {
+ print " glewPrintExt(\"$extname\", $extvar, $extpre" .
+ "ewIsSupported(\"$extname\"), $extpre" .
+ "ewGetExtension(\"$extstring\"));\n";
+ }
+ output_decls($functions, \&make_pfn_info);
+ print "}\n\n";
+ print "#endif /* $extname */\n\n";
+ }
+}
47 auto/bin/make_info_list.pl
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+#---------------------------------------------------------------------------------------
+
+# function pointer definition
+sub make_pfn_def($%)
+{
+ return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
+}
+
+# function pointer definition
+sub make_init_call($%)
+{
+ my $name = prefixname($_[0]);
+ return " r = r || (" . $name . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress((const GLubyte*)\"" . $name . "\")) == NULL;";
+}
+
+#---------------------------------------------------------------------------------------
+
+my @extlist = ();
+my %extensions = ();
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+
+ print "#ifdef $extname\n";
+ print " _glewInfo_$extname();\n";
+ print "#endif /* $extname */\n";
+ }
+}
55 auto/bin/make_init.pl
@@ -0,0 +1,55 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+#-------------------------------------------------------------------------------
+
+# function pointer definition
+sub make_pfn_def_init($%)
+{
+ #my $name = prefixname($_[0]);
+ return " r = ((" . $_[0] . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress((const GLubyte*)\"" . $_[0] . "\")) == NULL) || r;";
+}
+
+#-------------------------------------------------------------------------------
+
+my @extlist = ();
+my %extensions = ();
+
+our $type = shift;
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) =
+ parse_ext($ext);
+
+ #make_separator($extname);
+ print "#ifdef $extname\n\n";
+ my $extvar = $extname;
+ my $extvardef = $extname;
+ $extvar =~ s/GL(X*)_/GL$1EW_/;
+ if (keys %$functions)
+ {
+ print "static GLboolean _glewInit_$extname (" . $type .
+ "EW_CONTEXT_ARG_DEF_INIT)\n{\n GLboolean r = GL_FALSE;\n";
+ output_decls($functions, \&make_pfn_def_init);
+ print "\n return r;\n}\n\n";
+ }
+ #print "\nGLboolean " . prefix_varname($extvar) . " = GL_FALSE;\n\n";
+ print "#endif /* $extname */\n\n";
+ }
+}
66 auto/bin/make_list.pl
@@ -0,0 +1,66 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+#---------------------------------------------------------------------------------------
+
+# function pointer definition
+sub make_init_call($%)
+{
+ my $name = prefixname($_[0]);
+ return " r = r || (" . $_[0] . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress(\"" . $name . "\")) == NULL;";
+}
+
+#---------------------------------------------------------------------------------------
+
+my @extlist = ();
+my %extensions = ();
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+
+ my $extvar = $extname;
+ $extvar =~ s/GL(X*)_/GL$1EW_/;
+
+ my $extpre = $extname;
+ $extpre =~ s/^(W?)GL(X?).*$/\l$1gl\l$2ew/;
+
+ #my $pextvar = prefix_varname($extvar);
+
+ print "#ifdef $extname\n";
+
+ if (length($extstring))
+ {
+ print " CONST_CAST(" . $extvar . ") = " . $extpre . "GetExtension(\"$extstring\");\n";
+ }
+
+ if (keys %$functions)
+ {
+ if ($extname =~ /WGL_.*/)
+ {
+ print " if (glewExperimental || " . $extvar . "|| crippled) CONST_CAST(" . $extvar . ")= !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n";
+ }
+ else
+ {
+ print " if (glewExperimental || " . $extvar . ") CONST_CAST(" . $extvar . ") = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n";
+ }
+ }
+ print "#endif /* $extname */\n";
+ }
+
+}
53 auto/bin/make_str.pl
@@ -0,0 +1,53 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+my @extlist = ();
+my %extensions = ();
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ my $curexttype = "";
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+ my $exttype = $extname;
+ $exttype =~ s/(W*?)GL(X*?)_(.*?_)(.*)/$3/;
+ my $extrem = $extname;
+ $extrem =~ s/(W*?)GL(X*?)_(.*?_)(.*)/$4/;
+ my $extvar = $extname;
+ $extvar =~ s/(W*)GL(X*)_/$1GL$2EW_/;
+ if(!($exttype =~ $curexttype))
+ {
+ if(length($curexttype) > 0)
+ {
+ print " }\n";
+ }
+ print " if (_glewStrSame2(&pos, &len, (const GLubyte*)\"$exttype\", " . length($exttype) . "))\n";
+ print " {\n";
+ $curexttype = $exttype;
+ }
+ print "#ifdef $extname\n";
+ print " if (_glewStrSame3(&pos, &len, (const GLubyte*)\"$extrem\", ". length($extrem) . "))\n";
+ #print " return $extvar;\n";
+ print " {\n";
+ print " ret = $extvar;\n";
+ print " continue;\n";
+ print " }\n";
+ print "#endif\n";
+ }
+
+ print " }\n";
+}
36 auto/bin/make_struct_fun.pl
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+# function pointer declaration
+sub make_pfn_decl($%)
+{
+ our $export;
+ return $export . " PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . ";";
+}
+
+my @extlist = ();
+my %extensions = ();
+
+our $export = shift;
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+ output_decls($functions, \&make_pfn_decl);
+ }
+}
31 auto/bin/make_struct_var.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+do 'bin/make.pl';
+
+my @extlist = ();
+my %extensions = ();
+
+our $export = shift;
+
+if (@ARGV)
+{
+ @extlist = @ARGV;
+
+ foreach my $ext (sort @extlist)
+ {
+ my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
+ my $extvar = $extname;
+ $extvar =~ s/GL(X*)_/GL$1EW_/;
+ print $export . " GLboolean " . prefix_varname($extvar) . ";\n";
+ }
+}
335 auto/bin/parse_spec.pl
@@ -0,0 +1,335 @@
+#!/usr/bin/perl
+##
+## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
+## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
+##
+## 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.
+
+use strict;
+use warnings;
+
+sub compile_regex
+{
+ my $regex = join('', @_);
+ return qr/$regex/
+}
+
+my @sections = (
+ "Name",
+ "Name Strings?",
+ "New Procedures and Functions",
+ "New Tokens",
+);
+
+my %typemap = (
+ bitfield => "GLbitfield",
+ boolean => "GLboolean",
+ # fsck up in EXT_vertex_array
+ Boolean => "GLboolean",
+ byte => "GLbyte",
+ clampd => "GLclampd",
+ clampf => "GLclampf",
+ double => "GLdouble",
+ enum => "GLenum",
+ # Intel fsck up
+ Glenum => "GLenum",
+ float => "GLfloat",
+ half => "GLhalf",
+ int => "GLint",
+ short => "GLshort",
+ sizei => "GLsizei",
+ ubyte => "GLubyte",
+ uint => "GLuint",
+ ushort => "GLushort",
+ DMbuffer => "void *",
+ # Nvidia video output fsck up
+ int64EXT => "GLint64EXT",
+ uint64EXT=> "GLuint64EXT",
+
+ # ARB VBO introduces these.
+
+ sizeiptr => "GLsizeiptr",
+ intptr => "GLintptr",
+ sizeiptrARB => "GLsizeiptrARB",
+ intptrARB => "GLintptrARB",
+
+ # ARB shader objects introduces these, charARB is at least 8 bits,
+ # handleARB is at least 32 bits
+ charARB => "GLcharARB",
+ handleARB => "GLhandleARB",
+
+ # OpenGL 3.2 and GL_ARB_sync
+
+ int64 => "GLint64",
+ uint64 => "GLuint64",
+ sync => "GLsync",
+
+ # GLX 1.3 defines new types which might not be available at compile time
+
+ #GLXFBConfig => "void*",
+ #GLXFBConfigID => "XID",
+ #GLXContextID => "XID",
+ #GLXWindow => "XID",
+ #GLXPbuffer => "XID",
+
+ # Weird stuff to some SGIX extension
+
+ #GLXFBConfigSGIX => "void*",
+ #GLXFBConfigIDSGIX => "XID",
+
+);
+
+my %voidtypemap = (
+ void => "GLvoid",
+);
+
+my %taboo_tokens = (
+ GL_ZERO => 1,
+);
+
+# list of function definitions to be ignored, unless they are being defined in
+# the given spec. This is an ugly hack arround the fact that people writing
+# spec files seem to shut down all brain activity while they are at this task.
+#
+# This will be moved to its own file eventually.
+#
+# (mem, 2003-03-19)
+
+my %fnc_ignore_list = (
+ "BindProgramARB" => "ARB_vertex_program",
+ "ColorSubTableEXT" => "EXT_color_subtable",
+ "DeleteProgramsARB" => "ARB_vertex_program",
+ "GenProgramsARB" => "ARB_vertex_program",
+ "GetProgramEnvParameterdvARB" => "ARB_vertex_program",
+ "GetProgramEnvParameterfvARB" => "ARB_vertex_program",
+ "GetProgramLocalParameterdvARB" => "ARB_vertex_program",
+ "GetProgramLocalParameterfvARB" => "ARB_vertex_program",
+ "GetProgramStringARB" => "ARB_vertex_program",
+ "GetProgramivARB" => "ARB_vertex_program",
+ "IsProgramARB" => "ARB_vertex_program",
+ "ProgramEnvParameter4dARB" => "ARB_vertex_program",
+ "ProgramEnvParameter4dvARB" => "ARB_vertex_program",
+ "ProgramEnvParameter4fARB" => "ARB_vertex_program",
+ "ProgramEnvParameter4fvARB" => "ARB_vertex_program",
+ "ProgramLocalParameter4dARB" => "ARB_vertex_program",
+ "ProgramLocalParameter4dvARB" => "ARB_vertex_program",
+ "ProgramLocalParameter4fARB" => "ARB_vertex_program",
+ "ProgramLocalParameter4fvARB" => "ARB_vertex_program",
+ "ProgramStringARB" => "ARB_vertex_program",
+ "glXCreateContextAttribsARB" => "ARB_create_context_profile",
+ "wglCreateContextAttribsARB" => "WGL_ARB_create_context_profile",
+);
+
+my %regex = (
+ eofnc => qr/(?:\);?$|^$)/, # )$ | );$ | ^$
+ extname => qr/^[A-Z][A-Za-z0-9_]+$/,
+ none => qr/^